@xuda.io/xuda-db-adapter-module 1.0.125 → 1.0.126

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.
Files changed (2) hide show
  1. package/index.mjs +8 -8
  2. 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 || _.isEmpty(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
- _.forEach(_ds.data_feed.rows_added, function (val, key) {
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: _.assignIn(ds.locate_from, ds.locate_to),
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: _.assignIn(ds.locate_from, ds.locate_to),
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 (!_.isEmpty(filterModel?.filterModelNative)) {
414
+ if (!xu_isEmpty(filterModel?.filterModelNative)) {
415
415
  data.filterModelNative = JSON.stringify(filterModel.filterModelNative);
416
416
  }
417
- if (!_.isEmpty(filterModel?.filterModelMongo)) {
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 (!_.isEmpty(filterModel?.filterModelUserMongo)) {
424
+ if (!xu_isEmpty(filterModel?.filterModelUserMongo)) {
425
425
  data.filterModelUserMongo = JSON.stringify(filterModel.filterModelUserMongo);
426
426
  }
427
427
  if (filterModel?.filterModelUserSql) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-db-adapter-module",
3
- "version": "1.0.125",
3
+ "version": "1.0.126",
4
4
  "main": "index.mjs",
5
5
  "type": "module",
6
6
  "description": "Auto-generated build for xuda-db-adapter-module.mjs",