@pi-r/mongodb 0.6.10 → 0.6.12
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.
- package/client/index.js +8 -8
- package/package.json +4 -4
package/client/index.js
CHANGED
|
@@ -231,9 +231,9 @@ async function executeBatchQuery(batch, options = '', outResult) {
|
|
|
231
231
|
if (length === 0) {
|
|
232
232
|
return [];
|
|
233
233
|
}
|
|
234
|
-
let parallel, checkObject, connectOnce, errorQuery, sessionKey, outCacheMiss;
|
|
234
|
+
let parallel, checkObject, connectOnce, errorQuery, errorAsEmpty, sessionKey, outCacheMiss;
|
|
235
235
|
if ((0, types_1.isPlainObject)(options)) {
|
|
236
|
-
({ parallel, checkObject, connectOnce, errorQuery, sessionKey, outCacheMiss } = options);
|
|
236
|
+
({ parallel, checkObject, connectOnce, errorQuery, errorAsEmpty, sessionKey, outCacheMiss } = options);
|
|
237
237
|
}
|
|
238
238
|
else {
|
|
239
239
|
if (typeof options === 'string') {
|
|
@@ -356,7 +356,7 @@ async function executeBatchQuery(batch, options = '', outResult) {
|
|
|
356
356
|
continue;
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
|
-
else if (!aggregate && setResult()) {
|
|
359
|
+
else if (!aggregate && !update && setResult()) {
|
|
360
360
|
continue;
|
|
361
361
|
}
|
|
362
362
|
if (!ignoreCache && outCacheMiss) {
|
|
@@ -490,10 +490,9 @@ async function executeBatchQuery(batch, options = '', outResult) {
|
|
|
490
490
|
}
|
|
491
491
|
})
|
|
492
492
|
.on('end', () => stream.destroy());
|
|
493
|
+
return;
|
|
493
494
|
}
|
|
494
|
-
|
|
495
|
-
rows = await cursor.toArray();
|
|
496
|
-
}
|
|
495
|
+
rows = await cursor.toArray();
|
|
497
496
|
}
|
|
498
497
|
if (rows) {
|
|
499
498
|
this.add(item, 4);
|
|
@@ -526,8 +525,9 @@ async function executeBatchQuery(batch, options = '', outResult) {
|
|
|
526
525
|
}
|
|
527
526
|
}
|
|
528
527
|
return this.processRows(batch, tasks, {
|
|
529
|
-
|
|
530
|
-
|
|
528
|
+
parallel,
|
|
529
|
+
errorAsEmpty,
|
|
530
|
+
disconnect: () => clients.forEach(async (item) => item.close(true))
|
|
531
531
|
}, outResult);
|
|
532
532
|
}
|
|
533
533
|
exports.executeBatchQuery = executeBatchQuery;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-r/mongodb",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.12",
|
|
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.8.
|
|
25
|
-
"@e-mc/request": "^0.8.
|
|
26
|
-
"@e-mc/types": "^0.8.
|
|
24
|
+
"@e-mc/db": "^0.8.31",
|
|
25
|
+
"@e-mc/request": "^0.8.31",
|
|
26
|
+
"@e-mc/types": "^0.8.31",
|
|
27
27
|
"mongodb": "^6.8.0"
|
|
28
28
|
}
|
|
29
29
|
}
|