@pi-r/mongodb 0.10.5 → 0.10.6

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 +5 -5
  2. package/package.json +4 -4
package/client/index.js CHANGED
@@ -218,9 +218,9 @@ async function executeBatchQuery(batch, options = '', outResult) {
218
218
  if (length === 0) {
219
219
  return [];
220
220
  }
221
- let parallel, checkObject, connectOnce, errorQuery, sessionKey, outCacheMiss;
221
+ let parallel, checkObject, connectOnce, errorQuery, errorAsEmpty, sessionKey, outCacheMiss;
222
222
  if ((0, types_1.isPlainObject)(options)) {
223
- ({ parallel, checkObject, connectOnce, errorQuery, sessionKey, outCacheMiss } = options);
223
+ ({ parallel, checkObject, connectOnce, errorQuery, errorAsEmpty, sessionKey, outCacheMiss } = options);
224
224
  }
225
225
  else {
226
226
  if (typeof options === 'string') {
@@ -481,10 +481,9 @@ async function executeBatchQuery(batch, options = '', outResult) {
481
481
  }
482
482
  })
483
483
  .on('end', () => stream.destroy());
484
+ return;
484
485
  }
485
- else {
486
- rows = await cursor.toArray();
487
- }
486
+ rows = await cursor.toArray();
488
487
  }
489
488
  if (rows) {
490
489
  this.add(item, 4);
@@ -518,6 +517,7 @@ async function executeBatchQuery(batch, options = '', outResult) {
518
517
  }
519
518
  return this.processRows(batch, tasks, clients.length === 0 ? parallel : {
520
519
  parallel,
520
+ errorAsEmpty,
521
521
  disconnect() {
522
522
  for (const item of clients) {
523
523
  void item.close(true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-r/mongodb",
3
- "version": "0.10.5",
3
+ "version": "0.10.6",
4
4
  "description": "MongoDB client driver for E-mc.",
5
5
  "main": "client/index.js",
6
6
  "types": "client/index.d.ts",
@@ -20,9 +20,9 @@
20
20
  "license": "MIT",
21
21
  "homepage": "https://github.com/anpham6/pi-r#readme",
22
22
  "dependencies": {
23
- "@e-mc/db": "^0.12.17",
24
- "@e-mc/request": "^0.12.17",
25
- "@e-mc/types": "^0.12.17",
23
+ "@e-mc/db": "^0.12.18",
24
+ "@e-mc/request": "^0.12.18",
25
+ "@e-mc/types": "^0.12.18",
26
26
  "mongodb": "^6.19.0"
27
27
  }
28
28
  }