@pi-r/mongodb 0.7.7 → 0.7.8

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/client/index.js +7 -7
  2. package/package.json +4 -4
package/client/index.js CHANGED
@@ -228,9 +228,9 @@ async function executeBatchQuery(batch, options = '', outResult) {
228
228
  if (length === 0) {
229
229
  return [];
230
230
  }
231
- let parallel, checkObject, connectOnce, errorQuery, sessionKey, outCacheMiss;
231
+ let parallel, checkObject, connectOnce, errorQuery, errorAsEmpty, sessionKey, outCacheMiss;
232
232
  if ((0, types_1.isPlainObject)(options)) {
233
- ({ parallel, checkObject, connectOnce, errorQuery, sessionKey, outCacheMiss } = options);
233
+ ({ parallel, checkObject, connectOnce, errorQuery, errorAsEmpty, sessionKey, outCacheMiss } = options);
234
234
  }
235
235
  else {
236
236
  if (typeof options === 'string') {
@@ -486,10 +486,9 @@ async function executeBatchQuery(batch, options = '', outResult) {
486
486
  }
487
487
  })
488
488
  .on('end', () => stream.destroy());
489
+ return;
489
490
  }
490
- else {
491
- rows = await cursor.toArray();
492
- }
491
+ rows = await cursor.toArray();
493
492
  }
494
493
  if (rows) {
495
494
  this.add(item, 4);
@@ -522,10 +521,11 @@ async function executeBatchQuery(batch, options = '', outResult) {
522
521
  }
523
522
  }
524
523
  return this.processRows(batch, tasks, {
524
+ parallel,
525
+ errorAsEmpty,
525
526
  disconnect: () => clients.forEach(item => {
526
527
  item.close(true);
527
- }),
528
- parallel
528
+ })
529
529
  }, outResult);
530
530
  }
531
531
  exports.executeBatchQuery = executeBatchQuery;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-r/mongodb",
3
- "version": "0.7.7",
3
+ "version": "0.7.8",
4
4
  "description": "MongoDB client driver for E-mc.",
5
5
  "main": "client/index.js",
6
6
  "types": "client/index.d.ts",
@@ -21,9 +21,9 @@
21
21
  "license": "MIT",
22
22
  "homepage": "https://github.com/anpham6/pi-r#readme",
23
23
  "dependencies": {
24
- "@e-mc/db": "^0.9.28",
25
- "@e-mc/request": "^0.9.28",
26
- "@e-mc/types": "^0.9.28",
24
+ "@e-mc/db": "^0.9.30",
25
+ "@e-mc/request": "^0.9.30",
26
+ "@e-mc/types": "^0.9.30",
27
27
  "mongodb": "^6.9.0"
28
28
  }
29
29
  }