@xuda.io/xuda-dbs-plugin-xuda 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +9 -7
- package/package.json +1 -1
package/index.mjs
CHANGED
@@ -68,7 +68,9 @@ const check_unique = async function (docP, table_obj) {
|
|
68
68
|
keyValue.join(",") +
|
69
69
|
"]]";
|
70
70
|
try {
|
71
|
-
const json = await _this.runtime_xuda_driver("runtime_get_index", e);
|
71
|
+
// const json = await _this.runtime_xuda_driver("runtime_get_index", e);
|
72
|
+
e.view = "db_index";
|
73
|
+
const json = await _this.Read(_, e, db, app_id_reference, table_obj);
|
72
74
|
|
73
75
|
// var data;
|
74
76
|
|
@@ -154,7 +156,7 @@ const get_index_json = async function (docInP, table_obj) {
|
|
154
156
|
}
|
155
157
|
};
|
156
158
|
|
157
|
-
export const Create = async (_, e, db, table_obj) => {
|
159
|
+
export const Create = async (_, e, db, app_id_reference, table_obj) => {
|
158
160
|
const batch = async function () {
|
159
161
|
var docs = [];
|
160
162
|
try {
|
@@ -229,7 +231,7 @@ export const Create = async (_, e, db, table_obj) => {
|
|
229
231
|
}
|
230
232
|
return await single();
|
231
233
|
};
|
232
|
-
export const Read = async (_, e, db, table_obj) => {
|
234
|
+
export const Read = async (_, e, db, app_id_reference, table_obj) => {
|
233
235
|
var key;
|
234
236
|
|
235
237
|
const runtime_get_mango_data = async function () {
|
@@ -765,7 +767,7 @@ export const Read = async (_, e, db, table_obj) => {
|
|
765
767
|
|
766
768
|
// xuda
|
767
769
|
var cache_string = JSON.stringify(opt);
|
768
|
-
|
770
|
+
|
769
771
|
if (
|
770
772
|
// __.CACHE_QUERY_REQ[app_id_reference] &&
|
771
773
|
// __.CACHE_QUERY_REQ[app_id_reference][e.table_id] &&
|
@@ -928,7 +930,7 @@ export const Read = async (_, e, db, table_obj) => {
|
|
928
930
|
}
|
929
931
|
return await runtime_get_mango_data();
|
930
932
|
};
|
931
|
-
export const Update = async (_, e, db, table_obj) => {
|
933
|
+
export const Update = async (_, e, db, app_id_reference, table_obj) => {
|
932
934
|
try {
|
933
935
|
const doc = await db.get(e.row_id, {});
|
934
936
|
let data = doc.udfData.data;
|
@@ -979,7 +981,7 @@ export const Update = async (_, e, db, table_obj) => {
|
|
979
981
|
return { code: -550, data: error };
|
980
982
|
}
|
981
983
|
};
|
982
|
-
export const Delete = async (_, e, db, table_obj) => {
|
984
|
+
export const Delete = async (_, e, db, app_id_reference, table_obj) => {
|
983
985
|
const data = await db.fetch({ keys: e.ids });
|
984
986
|
for await (var val of data.rows) {
|
985
987
|
var doc = val.doc;
|
@@ -1006,7 +1008,7 @@ export const Delete = async (_, e, db, table_obj) => {
|
|
1006
1008
|
}
|
1007
1009
|
};
|
1008
1010
|
|
1009
|
-
export const Restore = async (_, e, db, table_obj) => {
|
1011
|
+
export const Restore = async (_, e, db, app_id_reference, table_obj) => {
|
1010
1012
|
var docs_to_restore = [];
|
1011
1013
|
const data = await db.fetch({ keys: e.ids });
|
1012
1014
|
|
package/package.json
CHANGED