@pi-r/mongodb 0.2.14 → 0.2.15

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
@@ -369,9 +369,9 @@ async function executeBatchQuery(batch, options = '', outResult) {
369
369
  return [];
370
370
  }
371
371
  const db = require("mongodb");
372
- let parallel, checkObject, connectOnce, errorQuery, sessionKey, outCacheMiss;
372
+ let parallel, checkObject, connectOnce, errorQuery, errorAsEmpty, sessionKey, outCacheMiss;
373
373
  if ((0, types_1.isPlainObject)(options)) {
374
- ({ parallel, checkObject, connectOnce, errorQuery, sessionKey, outCacheMiss } = options);
374
+ ({ parallel, checkObject, connectOnce, errorQuery, errorAsEmpty, sessionKey, outCacheMiss } = options);
375
375
  }
376
376
  else {
377
377
  if (typeof options === 'string') {
@@ -618,10 +618,9 @@ async function executeBatchQuery(batch, options = '', outResult) {
618
618
  }
619
619
  })
620
620
  .on('end', () => stream.destroy());
621
+ return;
621
622
  }
622
- else {
623
- rows = await cursor.toArray();
624
- }
623
+ rows = await cursor.toArray();
625
624
  }
626
625
  if (rows) {
627
626
  this.add(item, 4);
@@ -654,8 +653,9 @@ async function executeBatchQuery(batch, options = '', outResult) {
654
653
  }
655
654
  }
656
655
  return this.processRows(batch, tasks, {
657
- disconnect: () => clients.forEach(item => item.close(true)),
658
- parallel
656
+ parallel,
657
+ errorAsEmpty,
658
+ disconnect: () => clients.forEach(item => item.close(true))
659
659
  }, outResult);
660
660
  }
661
661
  exports.executeBatchQuery = executeBatchQuery;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-r/mongodb",
3
- "version": "0.2.14",
3
+ "version": "0.2.15",
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.5.21",
25
- "@e-mc/request": "^0.5.21",
26
- "@e-mc/types": "^0.5.21",
24
+ "@e-mc/db": "^0.5.23",
25
+ "@e-mc/request": "^0.5.23",
26
+ "@e-mc/types": "^0.5.23",
27
27
  "mongodb": "^5.9.2"
28
28
  }
29
29
  }