@e-mc/db 0.9.28 → 0.9.30
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/LICENSE +1 -1
- package/README.md +6 -6
- package/index.js +9 -4
- package/package.json +4 -4
package/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright
|
|
1
|
+
Copyright 2024 An Pham
|
|
2
2
|
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
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.9.
|
|
12
|
+
* [View Source](https://www.unpkg.com/@e-mc/types@0.9.30/lib/index.d.ts)
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
15
|
import type { DbDataSource } from "./squared";
|
|
@@ -200,11 +200,11 @@ const [rows1, rows2] = await instance.executeBatchQuery([
|
|
|
200
200
|
|
|
201
201
|
## References
|
|
202
202
|
|
|
203
|
-
- https://www.unpkg.com/@e-mc/types@0.9.
|
|
204
|
-
- https://www.unpkg.com/@e-mc/types@0.9.
|
|
205
|
-
- https://www.unpkg.com/@e-mc/types@0.9.
|
|
206
|
-
- https://www.unpkg.com/@e-mc/types@0.9.
|
|
207
|
-
- https://www.unpkg.com/@e-mc/types@0.9.
|
|
203
|
+
- https://www.unpkg.com/@e-mc/types@0.9.30/lib/squared.d.ts
|
|
204
|
+
- https://www.unpkg.com/@e-mc/types@0.9.30/lib/core.d.ts
|
|
205
|
+
- https://www.unpkg.com/@e-mc/types@0.9.30/lib/db.d.ts
|
|
206
|
+
- https://www.unpkg.com/@e-mc/types@0.9.30/lib/http.d.ts
|
|
207
|
+
- https://www.unpkg.com/@e-mc/types@0.9.30/lib/settings.d.ts
|
|
208
208
|
|
|
209
209
|
* https://www.npmjs.com/package/@types/node
|
|
210
210
|
|
package/index.js
CHANGED
|
@@ -150,9 +150,9 @@ class Db extends core_1.ClientDb {
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
async processRows(batch, tasks, parallel, outResult) {
|
|
153
|
-
let disconnect;
|
|
153
|
+
let errorAsEmpty, disconnect;
|
|
154
154
|
if ((0, types_1.isObject)(parallel)) {
|
|
155
|
-
({
|
|
155
|
+
({ parallel, errorAsEmpty, disconnect } = parallel);
|
|
156
156
|
}
|
|
157
157
|
const terminate = () => {
|
|
158
158
|
this.applyState(batch, 8);
|
|
@@ -168,8 +168,13 @@ class Db extends core_1.ClientDb {
|
|
|
168
168
|
this.applyState(batch, 16);
|
|
169
169
|
terminate();
|
|
170
170
|
if (outResult) {
|
|
171
|
-
|
|
172
|
-
outResult
|
|
171
|
+
if (errorAsEmpty) {
|
|
172
|
+
outResult.length = 0;
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
for (let i = 0, length = outResult.length; i < length; ++i) {
|
|
176
|
+
outResult[i] = null;
|
|
177
|
+
}
|
|
173
178
|
}
|
|
174
179
|
return outResult;
|
|
175
180
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e-mc/db",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.30",
|
|
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.9.
|
|
24
|
-
"@e-mc/request": "0.9.
|
|
25
|
-
"@e-mc/types": "0.9.
|
|
23
|
+
"@e-mc/core": "0.9.30",
|
|
24
|
+
"@e-mc/request": "0.9.30",
|
|
25
|
+
"@e-mc/types": "0.9.30"
|
|
26
26
|
}
|
|
27
27
|
}
|