@xuda.io/xuda-db-adapter-module 1.0.125 → 1.0.127
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 +8 -8
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -52,7 +52,7 @@ _db.save_data = async function (SESSION_ID, dsSessionP, keyP) {
|
|
|
52
52
|
|
|
53
53
|
let table_ret = await _this.func.utils.FILES_OBJ.get(SESSION_ID, dataSourceTableId);
|
|
54
54
|
|
|
55
|
-
if (!table_ret.tableIndexes ||
|
|
55
|
+
if (!table_ret.tableIndexes || xu_isEmpty(table_ret.tableIndexes)) {
|
|
56
56
|
_db.save_indicator(SESSION_ID, false);
|
|
57
57
|
_this.func.utils.alerts.invoke(SESSION_ID, 'system_msg', 'SYS_MSG_0104'); //index missing
|
|
58
58
|
return;
|
|
@@ -90,9 +90,9 @@ _db.save_data = async function (SESSION_ID, dsSessionP, keyP) {
|
|
|
90
90
|
_this.func.utils.alerts.invoke(SESSION_ID, 'system_msg', 'SYS_MSG_0120'); //Create Mode Denied
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
for (const [key, val] of Object.entries(_ds.data_feed.rows_added)) {
|
|
94
94
|
data[key] = val;
|
|
95
|
-
}
|
|
95
|
+
}
|
|
96
96
|
|
|
97
97
|
delete _ds.data_feed.rows_added['newRecord'];
|
|
98
98
|
save_ret = await _this.func.common.db(SESSION_ID, 'dbs_create', data, {}, dsSessionP);
|
|
@@ -342,7 +342,7 @@ _db.get_query = async function (
|
|
|
342
342
|
error: null,
|
|
343
343
|
source: viewSourceDescP,
|
|
344
344
|
json: data,
|
|
345
|
-
fields:
|
|
345
|
+
fields: Object.assign(ds.locate_from, ds.locate_to),
|
|
346
346
|
type: 'file',
|
|
347
347
|
dsSession: dsSessionP,
|
|
348
348
|
});
|
|
@@ -362,7 +362,7 @@ _db.get_query = async function (
|
|
|
362
362
|
error: err_msg,
|
|
363
363
|
source: viewSourceDescP,
|
|
364
364
|
json: null,
|
|
365
|
-
fields:
|
|
365
|
+
fields: Object.assign(ds.locate_from, ds.locate_to),
|
|
366
366
|
type: 'file',
|
|
367
367
|
dsSession: dsSessionP,
|
|
368
368
|
});
|
|
@@ -411,17 +411,17 @@ _db.get_query = async function (
|
|
|
411
411
|
data.sort_dir = sort_dir;
|
|
412
412
|
}
|
|
413
413
|
|
|
414
|
-
if (!
|
|
414
|
+
if (!xu_isEmpty(filterModel?.filterModelNative)) {
|
|
415
415
|
data.filterModelNative = JSON.stringify(filterModel.filterModelNative);
|
|
416
416
|
}
|
|
417
|
-
if (!
|
|
417
|
+
if (!xu_isEmpty(filterModel?.filterModelMongo)) {
|
|
418
418
|
data.filterModelMongo = JSON.stringify(filterModel.filterModelMongo);
|
|
419
419
|
}
|
|
420
420
|
|
|
421
421
|
if (filterModel?.filterModelSql) {
|
|
422
422
|
data.filterModelSql = JSON.stringify(filterModel.filterModelSql);
|
|
423
423
|
}
|
|
424
|
-
if (!
|
|
424
|
+
if (!xu_isEmpty(filterModel?.filterModelUserMongo)) {
|
|
425
425
|
data.filterModelUserMongo = JSON.stringify(filterModel.filterModelUserMongo);
|
|
426
426
|
}
|
|
427
427
|
if (filterModel?.filterModelUserSql) {
|