@xuda.io/xuda-worker-bundle-min 1.3.1146 → 1.3.1148
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.js +38 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1109,7 +1109,7 @@ func.api.call_system_api = async function (api_method, payload) {
|
|
|
1109
1109
|
|
|
1110
1110
|
return await api_utils.call_system_api(api_method, payload, null);
|
|
1111
1111
|
};
|
|
1112
|
-
func.api.dbs_read = async function (table_id, selector, fields, sort, limit, skip,) {
|
|
1112
|
+
func.api.dbs_read = async function (table_id, selector, fields, sort, limit, skip, cb) {
|
|
1113
1113
|
const SESSION_ID = Object.keys(SESSION_OBJ)[0];
|
|
1114
1114
|
const api_utils = await func.common.get_module(
|
|
1115
1115
|
SESSION_ID,
|
|
@@ -1124,9 +1124,9 @@ func.api.dbs_read = async function (table_id, selector, fields, sort, limit, ski
|
|
|
1124
1124
|
}
|
|
1125
1125
|
);
|
|
1126
1126
|
|
|
1127
|
-
return await api_utils.dbs_read(table_id, selector, fields, sort, limit, skip,);
|
|
1127
|
+
return await api_utils.dbs_read(table_id, selector, fields, sort, limit, skip, cb);
|
|
1128
1128
|
};
|
|
1129
|
-
func.api.dbs_create = async function (table_id, data) {
|
|
1129
|
+
func.api.dbs_create = async function (table_id, data, cb) {
|
|
1130
1130
|
const SESSION_ID = Object.keys(SESSION_OBJ)[0];
|
|
1131
1131
|
const api_utils = await func.common.get_module(
|
|
1132
1132
|
SESSION_ID,
|
|
@@ -1141,7 +1141,41 @@ func.api.dbs_create = async function (table_id, data) {
|
|
|
1141
1141
|
}
|
|
1142
1142
|
);
|
|
1143
1143
|
|
|
1144
|
-
return await api_utils.dbs_create(table_id, data);
|
|
1144
|
+
return await api_utils.dbs_create(table_id, row_id, data, cb);
|
|
1145
|
+
};
|
|
1146
|
+
func.api.dbs_update = async function (table_id, row_id, data) {
|
|
1147
|
+
const SESSION_ID = Object.keys(SESSION_OBJ)[0];
|
|
1148
|
+
const api_utils = await func.common.get_module(
|
|
1149
|
+
SESSION_ID,
|
|
1150
|
+
"xuda-api-library.mjs",
|
|
1151
|
+
{
|
|
1152
|
+
func,
|
|
1153
|
+
glb,
|
|
1154
|
+
SESSION_OBJ,
|
|
1155
|
+
SESSION_ID,
|
|
1156
|
+
APP_OBJ,
|
|
1157
|
+
dsSession: Object.keys(SESSION_OBJ[SESSION_ID].DS_GLB).at(-1),
|
|
1158
|
+
}
|
|
1159
|
+
);
|
|
1160
|
+
|
|
1161
|
+
return await api_utils.dbs_update(table_id, row_id, data, cb);
|
|
1162
|
+
};
|
|
1163
|
+
func.api.dbs_delete = async function (table_id, row_id, cb) {
|
|
1164
|
+
const SESSION_ID = Object.keys(SESSION_OBJ)[0];
|
|
1165
|
+
const api_utils = await func.common.get_module(
|
|
1166
|
+
SESSION_ID,
|
|
1167
|
+
"xuda-api-library.mjs",
|
|
1168
|
+
{
|
|
1169
|
+
func,
|
|
1170
|
+
glb,
|
|
1171
|
+
SESSION_OBJ,
|
|
1172
|
+
SESSION_ID,
|
|
1173
|
+
APP_OBJ,
|
|
1174
|
+
dsSession: Object.keys(SESSION_OBJ[SESSION_ID].DS_GLB).at(-1),
|
|
1175
|
+
}
|
|
1176
|
+
);
|
|
1177
|
+
|
|
1178
|
+
return await api_utils.dbs_delete(table_id, row_id, cb);
|
|
1145
1179
|
};
|
|
1146
1180
|
|
|
1147
1181
|
func.api.call_javascript = async function (prog_id, params, evaluate) {
|