@e-mc/db 0.10.21 → 0.10.22
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/README.md +6 -6
- package/index.js +9 -4
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
## Interface
|
|
11
11
|
|
|
12
|
-
* [View Source](https://www.unpkg.com/@e-mc/types@0.10.
|
|
12
|
+
* [View Source](https://www.unpkg.com/@e-mc/types@0.10.22/lib/index.d.ts)
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
15
|
import type { DbDataSource } from "./squared";
|
|
@@ -204,11 +204,11 @@ const [rows1, rows2] = await instance.executeBatchQuery([
|
|
|
204
204
|
|
|
205
205
|
## References
|
|
206
206
|
|
|
207
|
-
- https://www.unpkg.com/@e-mc/types@0.10.
|
|
208
|
-
- https://www.unpkg.com/@e-mc/types@0.10.
|
|
209
|
-
- https://www.unpkg.com/@e-mc/types@0.10.
|
|
210
|
-
- https://www.unpkg.com/@e-mc/types@0.10.
|
|
211
|
-
- https://www.unpkg.com/@e-mc/types@0.10.
|
|
207
|
+
- https://www.unpkg.com/@e-mc/types@0.10.22/lib/squared.d.ts
|
|
208
|
+
- https://www.unpkg.com/@e-mc/types@0.10.22/lib/core.d.ts
|
|
209
|
+
- https://www.unpkg.com/@e-mc/types@0.10.22/lib/db.d.ts
|
|
210
|
+
- https://www.unpkg.com/@e-mc/types@0.10.22/lib/http.d.ts
|
|
211
|
+
- https://www.unpkg.com/@e-mc/types@0.10.22/lib/settings.d.ts
|
|
212
212
|
|
|
213
213
|
* https://www.npmjs.com/package/@types/node
|
|
214
214
|
|
package/index.js
CHANGED
|
@@ -140,9 +140,9 @@ class Db extends core_1.ClientDb {
|
|
|
140
140
|
return this.getClient(batch[0].source).executeBatchQuery.call(this, batch, options, outResult);
|
|
141
141
|
}
|
|
142
142
|
async processRows(batch, tasks, parallel, outResult) {
|
|
143
|
-
let disconnect;
|
|
143
|
+
let errorAsEmpty, disconnect;
|
|
144
144
|
if ((0, types_1.isObject)(parallel)) {
|
|
145
|
-
({
|
|
145
|
+
({ parallel, errorAsEmpty, disconnect } = parallel);
|
|
146
146
|
}
|
|
147
147
|
const terminate = () => {
|
|
148
148
|
this.applyState(batch, 8);
|
|
@@ -158,8 +158,13 @@ class Db extends core_1.ClientDb {
|
|
|
158
158
|
this.applyState(batch, 16);
|
|
159
159
|
terminate();
|
|
160
160
|
if (outResult) {
|
|
161
|
-
|
|
162
|
-
outResult
|
|
161
|
+
if (errorAsEmpty) {
|
|
162
|
+
outResult.length = 0;
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
for (let i = 0, length = outResult.length; i < length; ++i) {
|
|
166
|
+
outResult[i] = null;
|
|
167
|
+
}
|
|
163
168
|
}
|
|
164
169
|
return outResult;
|
|
165
170
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e-mc/db",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.22",
|
|
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.10.
|
|
24
|
-
"@e-mc/request": "0.10.
|
|
25
|
-
"@e-mc/types": "0.10.
|
|
23
|
+
"@e-mc/core": "0.10.22",
|
|
24
|
+
"@e-mc/request": "0.10.22",
|
|
25
|
+
"@e-mc/types": "0.10.22"
|
|
26
26
|
}
|
|
27
27
|
}
|