@naturalcycles/db-lib 10.1.4 → 10.1.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.
|
@@ -806,7 +806,7 @@ export class CommonDao {
|
|
|
806
806
|
const started = this.logStarted(op, q.table);
|
|
807
807
|
let deleted = 0;
|
|
808
808
|
if (opt.chunkSize) {
|
|
809
|
-
const { chunkSize, chunkConcurrency =
|
|
809
|
+
const { chunkSize, chunkConcurrency = 8 } = opt;
|
|
810
810
|
await _pipeline([
|
|
811
811
|
this.cfg.db.streamQuery(q.select(['id']), opt).map(r => r.id),
|
|
812
812
|
transformChunk({ chunkSize }),
|
|
@@ -816,6 +816,7 @@ export class CommonDao {
|
|
|
816
816
|
}, {
|
|
817
817
|
predicate: _passthroughPredicate,
|
|
818
818
|
concurrency: chunkConcurrency,
|
|
819
|
+
errorMode: opt.errorMode || ErrorMode.THROW_IMMEDIATELY,
|
|
819
820
|
}),
|
|
820
821
|
// LogProgress should be AFTER the mapper, to be able to report correct stats
|
|
821
822
|
transformLogProgress({
|
package/package.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturalcycles/db-lib",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "10.1.
|
|
4
|
+
"version": "10.1.6",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@naturalcycles/js-lib": "^15",
|
|
7
7
|
"@naturalcycles/nodejs-lib": "^14"
|
|
8
8
|
},
|
|
9
|
-
"devDependencies": {
|
|
9
|
+
"devDependencies": {
|
|
10
|
+
"@naturalcycles/dev-lib": "*"
|
|
11
|
+
},
|
|
10
12
|
"files": [
|
|
11
13
|
"dist",
|
|
12
14
|
"src",
|
|
@@ -1051,7 +1051,7 @@ export class CommonDao<BM extends BaseDBEntity, DBM extends BaseDBEntity = BM, I
|
|
|
1051
1051
|
let deleted = 0
|
|
1052
1052
|
|
|
1053
1053
|
if (opt.chunkSize) {
|
|
1054
|
-
const { chunkSize, chunkConcurrency =
|
|
1054
|
+
const { chunkSize, chunkConcurrency = 8 } = opt
|
|
1055
1055
|
|
|
1056
1056
|
await _pipeline([
|
|
1057
1057
|
this.cfg.db.streamQuery<DBM>(q.select(['id']), opt).map(r => r.id),
|
|
@@ -1064,6 +1064,7 @@ export class CommonDao<BM extends BaseDBEntity, DBM extends BaseDBEntity = BM, I
|
|
|
1064
1064
|
{
|
|
1065
1065
|
predicate: _passthroughPredicate,
|
|
1066
1066
|
concurrency: chunkConcurrency,
|
|
1067
|
+
errorMode: opt.errorMode || ErrorMode.THROW_IMMEDIATELY,
|
|
1067
1068
|
},
|
|
1068
1069
|
),
|
|
1069
1070
|
// LogProgress should be AFTER the mapper, to be able to report correct stats
|