@sqb/connect
Advanced tools
Comparing version 4.8.2 to 4.9.0
@@ -7,3 +7,3 @@ "use strict"; | ||
const doublylinked_1 = tslib_1.__importDefault(require("doublylinked")); | ||
const putil_taskqueue_1 = tslib_1.__importDefault(require("putil-taskqueue")); | ||
const power_tasks_1 = require("power-tasks"); | ||
const putil_varhelpers_1 = require("putil-varhelpers"); | ||
@@ -20,3 +20,3 @@ const strict_typed_events_1 = require("strict-typed-events"); | ||
_intlcur; | ||
_taskQueue = new putil_taskqueue_1.default(); | ||
_taskQueue = new power_tasks_1.TaskQueue(); | ||
_fetchCache = new doublylinked_1.default(); | ||
@@ -224,3 +224,3 @@ _rowNum = 0; | ||
} | ||
}); | ||
}).toPromise(); | ||
if (!silent) | ||
@@ -227,0 +227,0 @@ this.emit('move', this.row, this._rowNum); |
@@ -7,3 +7,3 @@ "use strict"; | ||
const debug_1 = tslib_1.__importDefault(require("debug")); | ||
const putil_taskqueue_1 = tslib_1.__importDefault(require("putil-taskqueue")); | ||
const power_tasks_1 = require("power-tasks"); | ||
const putil_varhelpers_1 = require("putil-varhelpers"); | ||
@@ -20,3 +20,3 @@ const strict_typed_events_1 = require("strict-typed-events"); | ||
_intlcon; | ||
_tasks = new putil_taskqueue_1.default(); | ||
_tasks = new power_tasks_1.TaskQueue(); | ||
_options; | ||
@@ -95,3 +95,3 @@ _inTransaction = false; | ||
throw new Error(`Can't execute query, because connection is released`); | ||
return this._tasks.enqueue(() => this._execute(query, options)); | ||
return this._tasks.enqueue(() => this._execute(query, options)).toPromise(); | ||
} | ||
@@ -270,5 +270,7 @@ getRepository(entity, opts) { | ||
} | ||
else if (typeof query === 'string') { | ||
request.sql = query; | ||
request.params = options.params; | ||
else { // noinspection SuspiciousTypeOfGuard | ||
if (typeof query === 'string') { | ||
request.sql = query; | ||
request.params = options.params; | ||
} | ||
} | ||
@@ -275,0 +277,0 @@ // @ts-ignore |
import _debug from 'debug'; | ||
import DoublyLinked from 'doublylinked'; | ||
import TaskQueue from 'putil-taskqueue'; | ||
import { TaskQueue } from 'power-tasks'; | ||
import { coerceToInt } from 'putil-varhelpers'; | ||
@@ -218,3 +218,3 @@ import { AsyncEventEmitter, TypedEventEmitterClass } from 'strict-typed-events'; | ||
} | ||
}); | ||
}).toPromise(); | ||
if (!silent) | ||
@@ -221,0 +221,0 @@ this.emit('move', this.row, this._rowNum); |
import assert from 'assert'; | ||
import _debug from 'debug'; | ||
import TaskQueue from 'putil-taskqueue'; | ||
import { TaskQueue } from 'power-tasks'; | ||
import { coalesce, coerceToBoolean, coerceToInt, coerceToString } from "putil-varhelpers"; | ||
@@ -89,3 +89,3 @@ import { AsyncEventEmitter, TypedEventEmitterClass } from 'strict-typed-events'; | ||
throw new Error(`Can't execute query, because connection is released`); | ||
return this._tasks.enqueue(() => this._execute(query, options)); | ||
return this._tasks.enqueue(() => this._execute(query, options)).toPromise(); | ||
} | ||
@@ -264,5 +264,7 @@ getRepository(entity, opts) { | ||
} | ||
else if (typeof query === 'string') { | ||
request.sql = query; | ||
request.params = options.params; | ||
else { // noinspection SuspiciousTypeOfGuard | ||
if (typeof query === 'string') { | ||
request.sql = query; | ||
request.params = options.params; | ||
} | ||
} | ||
@@ -269,0 +271,0 @@ // @ts-ignore |
{ | ||
"name": "@sqb/connect", | ||
"description": "Multi-dialect database connection framework written with TypeScript", | ||
"version": "4.8.2", | ||
"version": "4.9.0", | ||
"author": "Panates", | ||
@@ -35,6 +35,6 @@ "contributors": [ | ||
"lodash": "^4.17.21", | ||
"power-tasks": "^1.6.4", | ||
"putil-isplainobject": "^1.1.5", | ||
"putil-merge": "^3.10.3", | ||
"putil-promisify": "^1.10.0", | ||
"putil-taskqueue": "^2.5.5", | ||
"putil-varhelpers": "^1.6.5", | ||
@@ -50,3 +50,3 @@ "reflect-metadata": "^0.1.13", | ||
"peerDependencies": { | ||
"@sqb/builder": "^4.8.2" | ||
"@sqb/builder": "^4.9.0" | ||
}, | ||
@@ -53,0 +53,0 @@ "type": "module", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
334837
8059
+ Addedpower-tasks@^1.6.4
+ Addedpower-tasks@1.11.0(transitive)
- Removedputil-taskqueue@^2.5.5
- Removedputil-taskqueue@2.5.5(transitive)