@pi-r/mongodb 0.3.8 → 0.3.9

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
@@ -368,9 +368,9 @@ async function executeBatchQuery(batch, options = '', outResult) {
368
368
  if (length === 0) {
369
369
  return [];
370
370
  }
371
- let parallel, checkObject, connectOnce, errorQuery, sessionKey, outCacheMiss;
371
+ let parallel, checkObject, connectOnce, errorQuery, errorAsEmpty, sessionKey, outCacheMiss;
372
372
  if ((0, types_1.isPlainObject)(options)) {
373
- ({ parallel, checkObject, connectOnce, errorQuery, sessionKey, outCacheMiss } = options);
373
+ ({ parallel, checkObject, connectOnce, errorQuery, errorAsEmpty, sessionKey, outCacheMiss } = options);
374
374
  }
375
375
  else {
376
376
  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.3.8",
3
+ "version": "0.3.9",
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.6.19",
25
- "@e-mc/request": "^0.6.19",
26
- "@e-mc/types": "^0.6.19",
24
+ "@e-mc/db": "^0.6.21",
25
+ "@e-mc/request": "^0.6.21",
26
+ "@e-mc/types": "^0.6.21",
27
27
  "mongodb": "^5.9.2"
28
28
  }
29
29
  }