@e-mc/db 0.7.24 → 0.7.25

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/index.js +9 -4
  2. package/package.json +4 -4
package/index.js CHANGED
@@ -119,9 +119,9 @@ class Db extends core_1.ClientDb {
119
119
  }
120
120
  }
121
121
  async processRows(batch, tasks, parallel, outResult) {
122
- let disconnect;
122
+ let errorAsEmpty, disconnect;
123
123
  if ((0, types_1.isObject)(parallel)) {
124
- ({ disconnect, parallel } = parallel);
124
+ ({ parallel, errorAsEmpty, disconnect } = parallel);
125
125
  }
126
126
  const terminate = () => {
127
127
  this.applyState(batch, 8);
@@ -137,8 +137,13 @@ class Db extends core_1.ClientDb {
137
137
  this.applyState(batch, 16);
138
138
  terminate();
139
139
  if (outResult) {
140
- for (let i = 0, length = outResult.length; i < length; ++i) {
141
- outResult[i] = null;
140
+ if (errorAsEmpty) {
141
+ outResult.length = 0;
142
+ }
143
+ else {
144
+ for (let i = 0, length = outResult.length; i < length; ++i) {
145
+ outResult[i] = null;
146
+ }
142
147
  }
143
148
  return outResult;
144
149
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/db",
3
- "version": "0.7.24",
3
+ "version": "0.7.25",
4
4
  "description": "DB modules for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -20,8 +20,8 @@
20
20
  "license": "MIT",
21
21
  "homepage": "https://github.com/anpham6/e-mc#readme",
22
22
  "dependencies": {
23
- "@e-mc/core": "0.7.24",
24
- "@e-mc/request": "0.7.24",
25
- "@e-mc/types": "0.7.24"
23
+ "@e-mc/core": "0.7.25",
24
+ "@e-mc/request": "0.7.25",
25
+ "@e-mc/types": "0.7.25"
26
26
  }
27
27
  }