@pi-r/mongodb 0.5.7 → 0.5.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
@@ -235,9 +235,9 @@ async function executeBatchQuery(batch, options = '', outResult) {
235
235
  if (length === 0) {
236
236
  return [];
237
237
  }
238
- let parallel, checkObject, connectOnce, errorQuery, sessionKey, outCacheMiss;
238
+ let parallel, checkObject, connectOnce, errorQuery, errorAsEmpty, sessionKey, outCacheMiss;
239
239
  if ((0, types_1.isPlainObject)(options)) {
240
- ({ parallel, checkObject, connectOnce, errorQuery, sessionKey, outCacheMiss } = options);
240
+ ({ parallel, checkObject, connectOnce, errorQuery, errorAsEmpty, sessionKey, outCacheMiss } = options);
241
241
  }
242
242
  else {
243
243
  if (typeof options === 'string') {
@@ -485,10 +485,9 @@ async function executeBatchQuery(batch, options = '', outResult) {
485
485
  }
486
486
  })
487
487
  .on('end', () => stream.destroy());
488
+ return;
488
489
  }
489
- else {
490
- rows = await cursor.toArray();
491
- }
490
+ rows = await cursor.toArray();
492
491
  }
493
492
  if (rows) {
494
493
  this.add(item, 4);
@@ -521,8 +520,9 @@ async function executeBatchQuery(batch, options = '', outResult) {
521
520
  }
522
521
  }
523
522
  return this.processRows(batch, tasks, {
524
- disconnect: () => clients.forEach(item => item.close(true)),
525
- parallel
523
+ parallel,
524
+ errorAsEmpty,
525
+ disconnect: () => clients.forEach(item => item.close(true))
526
526
  }, outResult);
527
527
  }
528
528
  exports.executeBatchQuery = executeBatchQuery;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-r/mongodb",
3
- "version": "0.5.7",
3
+ "version": "0.5.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.7.23",
25
- "@e-mc/request": "^0.7.23",
26
- "@e-mc/types": "^0.7.23",
24
+ "@e-mc/db": "^0.7.25",
25
+ "@e-mc/request": "^0.7.25",
26
+ "@e-mc/types": "^0.7.25",
27
27
  "mongodb": "^6.8.0"
28
28
  }
29
29
  }