@xuda.io/xuda-worker-bundle-min 1.3.811 → 1.3.813
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 +21 -23
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -279,25 +279,8 @@ func.common.db = async function (
|
|
|
279
279
|
return str.replace(/[^a-zA-Z0-9]/g, "");
|
|
280
280
|
}
|
|
281
281
|
const get_rep_id = function () {
|
|
282
|
-
// let _data = _.cloneDeep(dataP);
|
|
283
|
-
|
|
284
|
-
// delete _data.fields;
|
|
285
|
-
// delete _data.viewSourceDesc;
|
|
286
|
-
// delete _data.skip;
|
|
287
|
-
// delete _data.limit;
|
|
288
|
-
// delete _data.count;
|
|
289
|
-
// delete _data.reduce;
|
|
290
|
-
// delete _data.prog_id;
|
|
291
|
-
// delete _data.sortModel;
|
|
292
|
-
|
|
293
|
-
// if (dsSession && _session.DS_GLB[dsSession]) {
|
|
294
|
-
// if (_session.DS_GLB[dsSession].refreshed) {
|
|
295
|
-
// delete _data.filterModel;
|
|
296
|
-
// }
|
|
297
|
-
// }
|
|
298
|
-
|
|
299
282
|
let _data = {};
|
|
300
|
-
const
|
|
283
|
+
const fields_to_skip = [
|
|
301
284
|
"fields",
|
|
302
285
|
"viewSourceDesc",
|
|
303
286
|
"skip",
|
|
@@ -306,13 +289,17 @@ func.common.db = async function (
|
|
|
306
289
|
"reduce",
|
|
307
290
|
"prog_id",
|
|
308
291
|
"sortModel",
|
|
292
|
+
"filterModelMongo",
|
|
293
|
+
"filterModelSql",
|
|
294
|
+
"filterModelUserMongo",
|
|
295
|
+
"filterModelUserSql",
|
|
309
296
|
];
|
|
310
297
|
|
|
311
298
|
for (let [key, val] of Object.entries(dataP)) {
|
|
312
299
|
if (
|
|
313
300
|
typeof val !== "undefined" &&
|
|
314
301
|
val !== null &&
|
|
315
|
-
!
|
|
302
|
+
!fields_to_skip.includes(key)
|
|
316
303
|
) {
|
|
317
304
|
_data[key] = val;
|
|
318
305
|
}
|
|
@@ -352,7 +339,10 @@ func.common.db = async function (
|
|
|
352
339
|
};
|
|
353
340
|
|
|
354
341
|
const read_dbs_pouch = async function (db) {
|
|
355
|
-
if (
|
|
342
|
+
if (
|
|
343
|
+
_session?.DS_GLB?.[dsSession]?.refreshed &&
|
|
344
|
+
(dataP.filterModelMongo || dataP.filterModelSql)
|
|
345
|
+
) {
|
|
356
346
|
return {
|
|
357
347
|
code: 1,
|
|
358
348
|
data: await func.db.pouch[serviceP](SESSION_ID, data),
|
|
@@ -1340,6 +1330,8 @@ glb.REFERENCE_LESS_FUNCTIONS = [
|
|
|
1340
1330
|
"loader_off",
|
|
1341
1331
|
"emit_event",
|
|
1342
1332
|
"delay",
|
|
1333
|
+
"execute_evaluate_javascript",
|
|
1334
|
+
"execute_native_javascript",
|
|
1343
1335
|
];
|
|
1344
1336
|
|
|
1345
1337
|
var CACHE_PROG_UI = {};
|
|
@@ -2315,7 +2307,13 @@ func.datasource.execute = async function (
|
|
|
2315
2307
|
_ds.v,
|
|
2316
2308
|
_ds
|
|
2317
2309
|
);
|
|
2318
|
-
|
|
2310
|
+
const filterModel = {
|
|
2311
|
+
filterModelNative: _ds.progDataSource.filterModelNative,
|
|
2312
|
+
filterModelMongo: _ds.progDataSource.filterModelMongo,
|
|
2313
|
+
filterModelSql: _ds.progDataSource.filterModelSql,
|
|
2314
|
+
filterModelUserMongo: _ds.progDataSource.filterModelUserMongo,
|
|
2315
|
+
filterModelUserSql: _ds.progDataSource.filterModelUserSql,
|
|
2316
|
+
};
|
|
2319
2317
|
_ds.v.raw_data = await func.db.get_query(
|
|
2320
2318
|
SESSION_ID,
|
|
2321
2319
|
_ds._dataSourceTableId,
|
|
@@ -2330,7 +2328,7 @@ func.datasource.execute = async function (
|
|
|
2330
2328
|
null,
|
|
2331
2329
|
_ds?.progDataSource?.sortModel,
|
|
2332
2330
|
null,
|
|
2333
|
-
|
|
2331
|
+
filterModel
|
|
2334
2332
|
);
|
|
2335
2333
|
|
|
2336
2334
|
const ret_rows_found = await func.db.get_query(
|
|
@@ -2347,7 +2345,7 @@ func.datasource.execute = async function (
|
|
|
2347
2345
|
null,
|
|
2348
2346
|
null,
|
|
2349
2347
|
null,
|
|
2350
|
-
|
|
2348
|
+
filterModel
|
|
2351
2349
|
);
|
|
2352
2350
|
_ds.rows_found = ret_rows_found?.rows?.[0]?.value || 0;
|
|
2353
2351
|
|