@m2k-5f/pgtx 2.5.2 → 2.5.4
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/dist/clauses/array.clause.js +2 -2
- package/dist/clauses/exclude.clause.d.ts.map +1 -1
- package/dist/clauses/exclude.clause.js +2 -2
- package/dist/clauses/fragment.clause.d.ts.map +1 -1
- package/dist/clauses/fragment.clause.js +2 -5
- package/dist/clauses/iden.caluse.js +1 -1
- package/dist/clauses/insert.clause.d.ts.map +1 -1
- package/dist/clauses/insert.clause.js +10 -9
- package/dist/clauses/literal.clause.js +1 -1
- package/dist/clauses/update.clause.js +2 -2
- package/dist/clauses/where.clause.js +2 -2
- package/dist/connection.d.ts +3 -1
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +41 -37
- package/dist/queue.d.ts +17 -0
- package/dist/queue.d.ts.map +1 -1
- package/dist/queue.js +44 -4
- package/dist/transaction.d.ts +2 -2
- package/dist/transaction.d.ts.map +1 -1
- package/dist/transaction.js +2 -4
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/template-compiler.d.ts +2 -2
- package/dist/utils/template-compiler.d.ts.map +1 -1
- package/dist/utils/template-compiler.js +14 -9
- package/package.json +7 -5
|
@@ -16,13 +16,13 @@ export class ArrayClause extends Clause {
|
|
|
16
16
|
throw new TypeError(`Array item at index ${index} is undefined`);
|
|
17
17
|
}
|
|
18
18
|
if (index)
|
|
19
|
-
params.text
|
|
19
|
+
params.text += this.separator;
|
|
20
20
|
if (value instanceof Clause) {
|
|
21
21
|
value.mapIntoQuery(params);
|
|
22
22
|
}
|
|
23
23
|
else {
|
|
24
24
|
params.args.push(value);
|
|
25
|
-
params.text
|
|
25
|
+
params.text += `$${params.args.length}`;
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exclude.clause.d.ts","sourceRoot":"","sources":["../../src/clauses/exclude.clause.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,qBAAa,mBAAoB,SAAQ,MAAM;IAEvC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE;IAD7B,OAAO;IAIP,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,mBAAmB;IAI7C,YAAY,CAAC,MAAM,EAAE,oBAAoB;
|
|
1
|
+
{"version":3,"file":"exclude.clause.d.ts","sourceRoot":"","sources":["../../src/clauses/exclude.clause.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,qBAAa,mBAAoB,SAAQ,MAAM;IAEvC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE;IAD7B,OAAO;IAIP,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,mBAAmB;IAI7C,YAAY,CAAC,MAAM,EAAE,oBAAoB;CAInD"}
|
|
@@ -8,7 +8,7 @@ export class ExcludeUpdateClause extends Clause {
|
|
|
8
8
|
return new ExcludeUpdateClause(fields);
|
|
9
9
|
}
|
|
10
10
|
mapIntoQuery(params) {
|
|
11
|
-
params.text
|
|
12
|
-
.join(', ')
|
|
11
|
+
params.text += this.fields.map(f => `${f} = EXCLUDED.${f}`)
|
|
12
|
+
.join(', ');
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fragment.clause.d.ts","sourceRoot":"","sources":["../../src/clauses/fragment.clause.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAI,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,oBAAoB,EAAoB,MAAM,UAAU,CAAC;AAElE,qBAAa,cAAe,SAAQ,MAAM;IAElC,QAAQ,CAAC,SAAS,EAAE,oBAAoB;IACxC,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE;IAFxB,OAAO;IAKP,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,oBAAoB,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE;IAIpD,YAAY,CAAC,MAAM,EAAE,oBAAoB;
|
|
1
|
+
{"version":3,"file":"fragment.clause.d.ts","sourceRoot":"","sources":["../../src/clauses/fragment.clause.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAI,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,oBAAoB,EAAoB,MAAM,UAAU,CAAC;AAElE,qBAAa,cAAe,SAAQ,MAAM;IAElC,QAAQ,CAAC,SAAS,EAAE,oBAAoB;IACxC,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE;IAFxB,OAAO;IAKP,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,oBAAoB,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE;IAIpD,YAAY,CAAC,MAAM,EAAE,oBAAoB;CAMrD"}
|
|
@@ -10,11 +10,8 @@ export class FragmentClause extends Clause {
|
|
|
10
10
|
return new FragmentClause(strings, values);
|
|
11
11
|
}
|
|
12
12
|
mapIntoQuery(params) {
|
|
13
|
-
const compiled = compileSqlTemplate(
|
|
14
|
-
args: this.args,
|
|
15
|
-
templates: this.templates
|
|
16
|
-
}, params.args.length);
|
|
13
|
+
const compiled = compileSqlTemplate(this.templates, this.args, params.args.length);
|
|
17
14
|
params.args.push(...compiled.args);
|
|
18
|
-
params.text
|
|
15
|
+
params.text += compiled.text;
|
|
19
16
|
}
|
|
20
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insert.clause.d.ts","sourceRoot":"","sources":["../../src/clauses/insert.clause.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,qBAAa,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAE,SAAQ,MAAM;IAE/D,QAAQ,CAAC,OAAO,EAAE,CAAC,EAAE;IADzB,OAAO;IAIP,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE;IAO5D,YAAY,CAAC,MAAM,EAAE,oBAAoB;
|
|
1
|
+
{"version":3,"file":"insert.clause.d.ts","sourceRoot":"","sources":["../../src/clauses/insert.clause.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,qBAAa,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAE,SAAQ,MAAM;IAE/D,QAAQ,CAAC,OAAO,EAAE,CAAC,EAAE;IADzB,OAAO;IAIP,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE;IAO5D,YAAY,CAAC,MAAM,EAAE,oBAAoB;CAwBrD"}
|
|
@@ -13,20 +13,21 @@ export class InsertClause extends Clause {
|
|
|
13
13
|
mapIntoQuery(params) {
|
|
14
14
|
const columns = Object.keys(this.inserts[0]);
|
|
15
15
|
const columnsCount = columns.length;
|
|
16
|
-
params.text
|
|
16
|
+
params.text += `(${columns.join(', ')}) VALUES `;
|
|
17
17
|
this.inserts.forEach((object, index) => {
|
|
18
18
|
if (Object.keys(object).length !== columnsCount) {
|
|
19
19
|
throw new Error(`all rows must have the same columns`);
|
|
20
20
|
}
|
|
21
21
|
if (index)
|
|
22
|
-
params.text
|
|
23
|
-
params.text
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
params.text += ', ';
|
|
23
|
+
params.text +=
|
|
24
|
+
`(${Object.values(object).map(value => {
|
|
25
|
+
if (value === undefined)
|
|
26
|
+
return "DEFAULT";
|
|
27
|
+
params.args.push(value);
|
|
28
|
+
return `$${params.args.length}`;
|
|
29
|
+
})
|
|
30
|
+
.join(", ")})`;
|
|
30
31
|
});
|
|
31
32
|
}
|
|
32
33
|
}
|
|
@@ -13,9 +13,9 @@ export class UpdateClause extends Clause {
|
|
|
13
13
|
throw new Error('Update clause has no data to update. All values are `undefined`');
|
|
14
14
|
entries.forEach(([key, value], index) => {
|
|
15
15
|
if (index)
|
|
16
|
-
params.text
|
|
16
|
+
params.text += ', ';
|
|
17
17
|
params.args.push(value);
|
|
18
|
-
params.text
|
|
18
|
+
params.text += `${key} = $${params.args.length}`;
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -13,9 +13,9 @@ export class WhereClause extends Clause {
|
|
|
13
13
|
throw new Error('Where clause has no data to update. All values are `undefined`');
|
|
14
14
|
entries.forEach(([key, value], index) => {
|
|
15
15
|
if (index)
|
|
16
|
-
params.text
|
|
16
|
+
params.text += ' AND ';
|
|
17
17
|
params.args.push(value);
|
|
18
|
-
params.text
|
|
18
|
+
params.text += `"${key}" = $${params.args.length}`;
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
}
|
package/dist/connection.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export type ConnectionParams = {
|
|
|
12
12
|
logLevel?: LogLevel;
|
|
13
13
|
int8toBigint?: boolean;
|
|
14
14
|
queryTimeout?: number;
|
|
15
|
+
batchCapacity?: number;
|
|
16
|
+
flushShedule?: "nextTick" | "Immediate";
|
|
15
17
|
};
|
|
16
18
|
export type StatementName = Branded<string, 'StatementName'>;
|
|
17
19
|
export type QueryText = Branded<string, 'QueryText'>;
|
|
@@ -53,7 +55,7 @@ export declare class Connection {
|
|
|
53
55
|
private _isReconnecting;
|
|
54
56
|
private _socket;
|
|
55
57
|
private _writer;
|
|
56
|
-
private
|
|
58
|
+
private _batchQueue;
|
|
57
59
|
private _described;
|
|
58
60
|
private _describingPending;
|
|
59
61
|
private _parsed;
|
package/dist/connection.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAqB,MAAM,SAAS,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAK3C,OAAO,EAAS,MAAM,EAAM,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAGvC,KAAK,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;AAErD,MAAM,MAAM,gBAAgB,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAqB,MAAM,SAAS,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAK3C,OAAO,EAAS,MAAM,EAAM,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAGvC,KAAK,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ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AAC,aAAa;IA2IrB;;;OAGG;IACH,IAAI,QAAQ,YAEX;IAGD;;;;;;;;;OASG;IACH,KAAK;CAQR"}
|
package/dist/connection.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
|
+
import { nextTick } from "process";
|
|
1
2
|
import { ConnectionRequestWriter } from "./protocol/connection-request-writer";
|
|
2
3
|
import { createAuthorizedSocket } from "./protocol/socket-authorization";
|
|
3
4
|
import { ResponseTypes } from "./protocol/constants";
|
|
4
5
|
import { compileSqlTemplate } from "./utils/template-compiler";
|
|
5
6
|
import { Transaction } from "./transaction";
|
|
6
7
|
import { SocketConnector } from "./protocol/socket-connector";
|
|
7
|
-
import { Queue } from "./queue";
|
|
8
|
+
import { Queue, RingQueue } from "./queue";
|
|
8
9
|
import { Query, QueryState, StreamQuery } from "./query";
|
|
9
10
|
import { sql } from ".";
|
|
10
11
|
import { Begin, Future, Ok } from 'fluent-future';
|
|
11
12
|
import { PostgresError } from "./error";
|
|
13
|
+
const ErrBatchOverflowed = new PostgresError(`BatchOverflowError: Connection queue capacity exceeded.
|
|
14
|
+
Please increase the batch capacity parameter in your connection config.`);
|
|
12
15
|
const ErrConnectionClosed = new PostgresError("Connection is closed", 'connection_closed', "", "ERROR");
|
|
13
16
|
const ErrConnectionReconnecring = new PostgresError("Connection are reconnecting", "connection_reconnecting", "", "ERROR");
|
|
14
17
|
/**
|
|
@@ -53,7 +56,7 @@ export class Connection {
|
|
|
53
56
|
this._isFlushing = false;
|
|
54
57
|
this._isOpened = true;
|
|
55
58
|
this._isReconnecting = false;
|
|
56
|
-
this.
|
|
59
|
+
this._batchQueue = new Queue();
|
|
57
60
|
this._described = new Map();
|
|
58
61
|
this._describingPending = new Set();
|
|
59
62
|
this._parsed = new Map();
|
|
@@ -117,13 +120,13 @@ export class Connection {
|
|
|
117
120
|
*/
|
|
118
121
|
query(templates, ...params) {
|
|
119
122
|
this._checkOpened();
|
|
120
|
-
|
|
121
|
-
const { text, args } = compileSqlTemplate({ templates, args: params });
|
|
123
|
+
const { text, args } = compileSqlTemplate(templates, params);
|
|
122
124
|
if (this._logLevel === 'query') {
|
|
123
125
|
console.log(`\nQUERY: ${text}\n${args.length !== 0 ? `ARGUMENTS: [${args}]\n` : ""}`);
|
|
124
126
|
}
|
|
125
127
|
const query = this._createQuery(text, args);
|
|
126
|
-
this._writeQuery(query)
|
|
128
|
+
if (this._writeQuery(query))
|
|
129
|
+
return Future.reject(ErrBatchOverflowed);
|
|
127
130
|
query.startTimeout(this.params.queryTimeout || 30000);
|
|
128
131
|
return query.future;
|
|
129
132
|
}
|
|
@@ -249,8 +252,7 @@ export class Connection {
|
|
|
249
252
|
*/
|
|
250
253
|
stream(templates, ...params) {
|
|
251
254
|
this._checkOpened();
|
|
252
|
-
|
|
253
|
-
const { text, args } = compileSqlTemplate({ templates, args: params });
|
|
255
|
+
const { text, args } = compileSqlTemplate(templates, params);
|
|
254
256
|
if (this._logLevel === 'query') {
|
|
255
257
|
console.log(`\nQUERY: ${text}\n${args.length !== 0 ? `ARGUMENTS: [${args}]\n` : ""}`);
|
|
256
258
|
}
|
|
@@ -261,19 +263,20 @@ export class Connection {
|
|
|
261
263
|
}
|
|
262
264
|
});
|
|
263
265
|
const query = this._createStream(text, args, controller);
|
|
264
|
-
this._writeQuery(query)
|
|
266
|
+
if (this._writeQuery(query))
|
|
267
|
+
throw ErrBatchOverflowed;
|
|
265
268
|
query.startTimeout(this.params.queryTimeout || 30000);
|
|
266
269
|
return stream;
|
|
267
270
|
}
|
|
268
271
|
_streamWithController(templates, params, controller) {
|
|
269
272
|
this._checkOpened();
|
|
270
|
-
|
|
271
|
-
const { text, args } = compileSqlTemplate({ templates, args: params });
|
|
273
|
+
const { text, args } = compileSqlTemplate(templates, params);
|
|
272
274
|
if (this._logLevel === 'query') {
|
|
273
275
|
console.log(`\nQUERY: ${text}\n${args.length !== 0 ? `ARGUMENTS: [${args}]\n` : ""}`);
|
|
274
276
|
}
|
|
275
277
|
const query = this._createStream(text, args, controller);
|
|
276
|
-
this._writeQuery(query)
|
|
278
|
+
if (this._writeQuery(query))
|
|
279
|
+
throw ErrBatchOverflowed;
|
|
277
280
|
query.startTimeout(this.params.queryTimeout || 30000);
|
|
278
281
|
return query;
|
|
279
282
|
}
|
|
@@ -336,34 +339,34 @@ export class Connection {
|
|
|
336
339
|
}
|
|
337
340
|
}
|
|
338
341
|
_writeQuery(query) {
|
|
342
|
+
const batch = this._registerFlush();
|
|
343
|
+
if (batch.isFull)
|
|
344
|
+
return true;
|
|
345
|
+
batch.push(query);
|
|
339
346
|
if (query.state === QueryState.Parsing) {
|
|
340
347
|
this._writer
|
|
341
348
|
.writeParse(query.statementName, query.text)
|
|
342
|
-
.writeDescribe(query.statementName)
|
|
343
|
-
.writeBind("", query.statementName, query.args)
|
|
344
|
-
.writeExecute("");
|
|
349
|
+
.writeDescribe(query.statementName);
|
|
345
350
|
}
|
|
346
351
|
if (query.state === QueryState.Describing) {
|
|
347
352
|
this._writer
|
|
348
|
-
.writeDescribe(query.statementName)
|
|
349
|
-
.writeBind("", query.statementName, query.args)
|
|
350
|
-
.writeExecute("");
|
|
353
|
+
.writeDescribe(query.statementName);
|
|
351
354
|
}
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
.writeExecute("");
|
|
356
|
-
}
|
|
357
|
-
this._pipelinesQueue.last.push(query);
|
|
355
|
+
this._writer
|
|
356
|
+
.writeBind("", query.statementName, query.args)
|
|
357
|
+
.writeExecute("");
|
|
358
358
|
}
|
|
359
359
|
_registerFlush() {
|
|
360
360
|
if (!this._isFlushing) {
|
|
361
361
|
this._isFlushing = true;
|
|
362
|
-
this.
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
362
|
+
const batch = new RingQueue(this.params.batchCapacity);
|
|
363
|
+
this._batchQueue.push(batch);
|
|
364
|
+
this.params.flushShedule === 'nextTick'
|
|
365
|
+
? nextTick(() => this._flush())
|
|
366
|
+
: setImmediate(() => this._flush());
|
|
367
|
+
return batch;
|
|
366
368
|
}
|
|
369
|
+
return this._batchQueue.last;
|
|
367
370
|
}
|
|
368
371
|
_flush() {
|
|
369
372
|
if (!this._isOpened) {
|
|
@@ -372,15 +375,15 @@ export class Connection {
|
|
|
372
375
|
}
|
|
373
376
|
if (this._isReconnecting) {
|
|
374
377
|
this._reconnect().then(() => {
|
|
375
|
-
this._isFlushing = false;
|
|
376
378
|
this._socket.write(this._writer.writeSync());
|
|
377
379
|
this._writer.clear();
|
|
380
|
+
this._isFlushing = false;
|
|
378
381
|
});
|
|
379
382
|
}
|
|
380
383
|
else {
|
|
381
|
-
this._isFlushing = false;
|
|
382
384
|
this._socket.write(this._writer.writeSync());
|
|
383
385
|
this._writer.clear();
|
|
386
|
+
this._isFlushing = false;
|
|
384
387
|
}
|
|
385
388
|
}
|
|
386
389
|
_registerReconnect() {
|
|
@@ -396,6 +399,7 @@ export class Connection {
|
|
|
396
399
|
this._rejectPipeline(cause);
|
|
397
400
|
}
|
|
398
401
|
async _reconnect() {
|
|
402
|
+
console.log('reconnecting');
|
|
399
403
|
this._resetConnectionState(ErrConnectionReconnecring);
|
|
400
404
|
const socket = await createAuthorizedSocket(ConnectionRequestWriter.new(), this.params);
|
|
401
405
|
const connector = new SocketConnector(socket, (type, _, reader) => this._handlePacket(type, reader), (err) => this._registerReconnect());
|
|
@@ -412,12 +416,12 @@ export class Connection {
|
|
|
412
416
|
return Promise.all(promises);
|
|
413
417
|
}
|
|
414
418
|
_getCurrentQuery() {
|
|
415
|
-
return this.
|
|
419
|
+
return this._batchQueue.current.current;
|
|
416
420
|
}
|
|
417
421
|
_rejectPipeline(error) {
|
|
418
|
-
if (this.
|
|
422
|
+
if (this._batchQueue.isFree)
|
|
419
423
|
return;
|
|
420
|
-
const queue = this.
|
|
424
|
+
const queue = this._batchQueue.current;
|
|
421
425
|
while (queue.hasMore) {
|
|
422
426
|
queue.shift.reject(error);
|
|
423
427
|
}
|
|
@@ -480,7 +484,7 @@ export class Connection {
|
|
|
480
484
|
case ResponseTypes.ComandComplete:
|
|
481
485
|
{
|
|
482
486
|
reader.readCommandComplete();
|
|
483
|
-
if (this.
|
|
487
|
+
if (this._batchQueue.isFree) {
|
|
484
488
|
this.close();
|
|
485
489
|
break;
|
|
486
490
|
}
|
|
@@ -490,7 +494,7 @@ export class Connection {
|
|
|
490
494
|
break;
|
|
491
495
|
}
|
|
492
496
|
query.state = QueryState.Completed;
|
|
493
|
-
this.
|
|
497
|
+
this._batchQueue.current.next();
|
|
494
498
|
query.resolve();
|
|
495
499
|
}
|
|
496
500
|
break;
|
|
@@ -516,7 +520,7 @@ export class Connection {
|
|
|
516
520
|
case ResponseTypes.ReadyForQuery:
|
|
517
521
|
{
|
|
518
522
|
reader.readReadyForQuery();
|
|
519
|
-
this.
|
|
523
|
+
this._batchQueue.next();
|
|
520
524
|
}
|
|
521
525
|
break;
|
|
522
526
|
case ResponseTypes.Notice:
|
|
@@ -559,9 +563,9 @@ export class Connection {
|
|
|
559
563
|
close() {
|
|
560
564
|
this._isOpened = false;
|
|
561
565
|
this._socket.destroy();
|
|
562
|
-
while (this.
|
|
566
|
+
while (this._batchQueue.hasMore) {
|
|
563
567
|
this._rejectPipeline(ErrConnectionClosed);
|
|
564
|
-
this.
|
|
568
|
+
this._batchQueue.next();
|
|
565
569
|
}
|
|
566
570
|
}
|
|
567
571
|
}
|
package/dist/queue.d.ts
CHANGED
|
@@ -10,4 +10,21 @@ export declare class Queue<T> {
|
|
|
10
10
|
get hasMore(): boolean;
|
|
11
11
|
get isFree(): boolean;
|
|
12
12
|
}
|
|
13
|
+
export declare class RingQueue<T> {
|
|
14
|
+
private readonly _queue;
|
|
15
|
+
private readonly _mask;
|
|
16
|
+
private _head;
|
|
17
|
+
private _tail;
|
|
18
|
+
private _size;
|
|
19
|
+
constructor(requestedCapacity?: number);
|
|
20
|
+
next(): void;
|
|
21
|
+
get current(): T;
|
|
22
|
+
get last(): T;
|
|
23
|
+
get shift(): T;
|
|
24
|
+
push(item: T): void;
|
|
25
|
+
get size(): number;
|
|
26
|
+
get hasMore(): boolean;
|
|
27
|
+
get isFree(): boolean;
|
|
28
|
+
get isFull(): boolean;
|
|
29
|
+
}
|
|
13
30
|
//# sourceMappingURL=queue.d.ts.map
|
package/dist/queue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../src/queue.ts"],"names":[],"mappings":"AAAA,qBAAa,KAAK,CAAC,CAAC;IAChB,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,QAAQ,CAAI;IAEpB,IAAI;
|
|
1
|
+
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../src/queue.ts"],"names":[],"mappings":"AAAA,qBAAa,KAAK,CAAC,CAAC;IAChB,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,QAAQ,CAAI;IAEpB,IAAI;IAUJ,IAAI,OAAO,MAEV;IAED,IAAI,IAAI,MAA+C;IAGvD,IAAI,KAAK,MAKR;IAGD,IAAI,CAAC,IAAI,EAAE,CAAC;IAIZ,IAAI,IAAI,WAEP;IAGD,IAAI,OAAO,YAEV;IAGD,IAAI,MAAM,YAA+C;CAC5D;AAID,qBAAa,SAAS,CAAC,CAAC;IACpB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAK;IAC5B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAQ;IAE9B,OAAO,CAAC,KAAK,CAAI;IACjB,OAAO,CAAC,KAAK,CAAI;IACjB,OAAO,CAAC,KAAK,CAAI;gBAEL,iBAAiB,SAAQ;IAOrC,IAAI;IAMJ,IAAI,OAAO,MAEV;IAED,IAAI,IAAI,MAEP;IAED,IAAI,KAAK,MAIR;IAED,IAAI,CAAC,IAAI,EAAE,CAAC;IAMZ,IAAI,IAAI,WAEP;IAED,IAAI,OAAO,YAEV;IAED,IAAI,MAAM,YAET;IAED,IAAI,MAAM,YAET;CACJ"}
|
package/dist/queue.js
CHANGED
|
@@ -4,11 +4,8 @@ export class Queue {
|
|
|
4
4
|
this._pointer = 0;
|
|
5
5
|
}
|
|
6
6
|
next() {
|
|
7
|
+
this._queue[this._pointer] = undefined;
|
|
7
8
|
this._pointer++;
|
|
8
|
-
if (this._pointer > 10000) {
|
|
9
|
-
this._queue.splice(0, this._pointer);
|
|
10
|
-
this._pointer = 0;
|
|
11
|
-
}
|
|
12
9
|
if (this._pointer >= this._queue.length) {
|
|
13
10
|
this._queue.length = 0;
|
|
14
11
|
this._pointer = 0;
|
|
@@ -34,3 +31,46 @@ export class Queue {
|
|
|
34
31
|
}
|
|
35
32
|
get isFree() { return this._pointer >= this._queue.length; }
|
|
36
33
|
}
|
|
34
|
+
export class RingQueue {
|
|
35
|
+
constructor(requestedCapacity = 20000) {
|
|
36
|
+
this._head = 0;
|
|
37
|
+
this._tail = 0;
|
|
38
|
+
this._size = 0;
|
|
39
|
+
const capacity = 2 ** Math.ceil(Math.log2(requestedCapacity));
|
|
40
|
+
this._queue = new Array();
|
|
41
|
+
this._mask = capacity - 1;
|
|
42
|
+
}
|
|
43
|
+
next() {
|
|
44
|
+
this._queue[this._head] = undefined;
|
|
45
|
+
this._head = (this._head + 1) & this._mask;
|
|
46
|
+
this._size--;
|
|
47
|
+
}
|
|
48
|
+
get current() {
|
|
49
|
+
return this._queue[this._head];
|
|
50
|
+
}
|
|
51
|
+
get last() {
|
|
52
|
+
return this._queue[(this._tail - 1) & this._mask];
|
|
53
|
+
}
|
|
54
|
+
get shift() {
|
|
55
|
+
const item = this.current;
|
|
56
|
+
this.next();
|
|
57
|
+
return item;
|
|
58
|
+
}
|
|
59
|
+
push(item) {
|
|
60
|
+
this._queue[this._tail] = item;
|
|
61
|
+
this._tail = (this._tail + 1) & this._mask;
|
|
62
|
+
this._size++;
|
|
63
|
+
}
|
|
64
|
+
get size() {
|
|
65
|
+
return this._size;
|
|
66
|
+
}
|
|
67
|
+
get hasMore() {
|
|
68
|
+
return this._size !== 0;
|
|
69
|
+
}
|
|
70
|
+
get isFree() {
|
|
71
|
+
return this._size === 0;
|
|
72
|
+
}
|
|
73
|
+
get isFull() {
|
|
74
|
+
return this._size === this._mask + 1;
|
|
75
|
+
}
|
|
76
|
+
}
|
package/dist/transaction.d.ts
CHANGED
|
@@ -17,11 +17,11 @@ export declare class Transaction {
|
|
|
17
17
|
/**
|
|
18
18
|
* Commits the current transaction.
|
|
19
19
|
*/
|
|
20
|
-
commit(): Future<
|
|
20
|
+
commit(): Future<Record<string, any>[], any>;
|
|
21
21
|
/**
|
|
22
22
|
* Rolls back the current transaction.
|
|
23
23
|
*/
|
|
24
|
-
rollback(): Future<
|
|
24
|
+
rollback(): Future<Record<string, any>[], any>;
|
|
25
25
|
/**
|
|
26
26
|
* Executes a query within the current transaction.
|
|
27
27
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../src/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAE,MAAM,eAAe,CAAA;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAEvC;;;GAGG;AACH,qBAAa,WAAW;IAIhB,QAAQ,CAAC,IAAI,EAAE,UAAU;IAH7B,OAAO,CAAC,UAAU,CAAiB;gBAGtB,IAAI,EAAE,UAAU;IAG7B;;OAEG;IACH,IAAW,QAAQ,IAAI,OAAO,CAE7B;IAED,OAAO,CAAC,WAAW;IAMnB;;OAEG;IACI,MAAM;
|
|
1
|
+
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../src/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAE,MAAM,eAAe,CAAA;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAEvC;;;GAGG;AACH,qBAAa,WAAW;IAIhB,QAAQ,CAAC,IAAI,EAAE,UAAU;IAH7B,OAAO,CAAC,UAAU,CAAiB;gBAGtB,IAAI,EAAE,UAAU;IAG7B;;OAEG;IACH,IAAW,QAAQ,IAAI,OAAO,CAE7B;IAED,OAAO,CAAC,WAAW;IAMnB;;OAEG;IACI,MAAM;IAOb;;OAEG;IACI,QAAQ;IAOf;;OAEG;IACI,KAAK,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,EAAE,oBAAoB,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE;IAK3F;;;;;;;;;OASG;IACI,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC;CAWjG"}
|
package/dist/transaction.js
CHANGED
|
@@ -26,8 +26,7 @@ export class Transaction {
|
|
|
26
26
|
commit() {
|
|
27
27
|
this.checkActive();
|
|
28
28
|
return this.conn.query `COMMIT`
|
|
29
|
-
.tap(() =>
|
|
30
|
-
.map(() => { });
|
|
29
|
+
.tap(() => this.isFinished = true);
|
|
31
30
|
}
|
|
32
31
|
/**
|
|
33
32
|
* Rolls back the current transaction.
|
|
@@ -35,8 +34,7 @@ export class Transaction {
|
|
|
35
34
|
rollback() {
|
|
36
35
|
this.checkActive();
|
|
37
36
|
return this.conn.query `ROLLBACK`
|
|
38
|
-
.tap(() =>
|
|
39
|
-
.map(() => { });
|
|
37
|
+
.tap(() => this.isFinished = true);
|
|
40
38
|
}
|
|
41
39
|
/**
|
|
42
40
|
* Executes a query within the current transaction.
|
package/dist/types.d.ts
CHANGED
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAA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AAA;IACZ,OAAO,EAAE,WAAW,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,OAAO,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,GAAG;IAAC,OAAO,EAAE,KAAK,CAAA;CAAC,CAAA;AAEpD,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { CompiledSqlQuery
|
|
2
|
-
export declare function compileSqlTemplate(
|
|
1
|
+
import { CompiledSqlQuery } from "../types";
|
|
2
|
+
export declare function compileSqlTemplate(templates: TemplateStringsArray, args: unknown[], argOffset?: number): CompiledSqlQuery;
|
|
3
3
|
//# sourceMappingURL=template-compiler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-compiler.d.ts","sourceRoot":"","sources":["../../src/utils/template-compiler.ts"],"names":[],"mappings":"AACA,OAAO,EAAwB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"template-compiler.d.ts","sourceRoot":"","sources":["../../src/utils/template-compiler.ts"],"names":[],"mappings":"AACA,OAAO,EAAwB,gBAAgB,EAAoB,MAAM,UAAU,CAAA;AAInF,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,oBAAoB,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,SAAS,SAAI,GAAG,gBAAgB,CAoCpH"}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import { Clause } from "../clauses/abstract.clause";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
const cache = new WeakMap();
|
|
3
|
+
export function compileSqlTemplate(templates, args, argOffset = 0) {
|
|
4
|
+
const cached = cache.get(templates);
|
|
5
|
+
if (cached)
|
|
6
|
+
return { args: args.map(prepareValue), text: cached };
|
|
7
|
+
const templateLength = templates.length;
|
|
4
8
|
const query = {
|
|
5
|
-
text:
|
|
9
|
+
text: '',
|
|
6
10
|
args: [],
|
|
7
11
|
};
|
|
8
|
-
|
|
9
|
-
query.text
|
|
12
|
+
templates.forEach((template, index) => {
|
|
13
|
+
query.text += template;
|
|
10
14
|
if (index === templateLength - 1)
|
|
11
15
|
return;
|
|
12
|
-
const value =
|
|
16
|
+
const value = args[index];
|
|
13
17
|
if (value instanceof Clause) {
|
|
14
18
|
value.mapIntoQuery(query);
|
|
15
19
|
}
|
|
@@ -19,10 +23,11 @@ export function compileSqlTemplate(params, argOffset = 0) {
|
|
|
19
23
|
Use null if you want NULL in SQL, or ensure the value is defined.`);
|
|
20
24
|
}
|
|
21
25
|
query.args.push(value);
|
|
22
|
-
query.text
|
|
26
|
+
query.text += `$${query.args.length + argOffset}`;
|
|
23
27
|
}
|
|
24
28
|
});
|
|
25
|
-
|
|
29
|
+
!args.some(value => value instanceof Clause) && cache.set(templates, query.text);
|
|
30
|
+
return { args: query.args.map(prepareValue), text: query.text };
|
|
26
31
|
}
|
|
27
32
|
const prepareValue = (value) => {
|
|
28
33
|
if (value === null || value === undefined) {
|
|
@@ -54,7 +59,7 @@ const prepareValue = (value) => {
|
|
|
54
59
|
}
|
|
55
60
|
return prepareObject(value);
|
|
56
61
|
}
|
|
57
|
-
return value
|
|
62
|
+
return String(value);
|
|
58
63
|
};
|
|
59
64
|
const prepareObject = (obj) => {
|
|
60
65
|
if (obj && typeof obj.toPG === 'function') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m2k-5f/pgtx",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Blazing-fast PostgreSQL driver with pipeline support.",
|
|
6
6
|
"files": [
|
|
@@ -16,11 +16,13 @@
|
|
|
16
16
|
},
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
|
-
"url": "git://github.com/
|
|
19
|
+
"url": "git://github.com/M2Kc-s4/pgtx.git"
|
|
20
20
|
},
|
|
21
21
|
"keywords": [
|
|
22
22
|
"sql",
|
|
23
23
|
"postgres",
|
|
24
|
+
"blazing",
|
|
25
|
+
"stream",
|
|
24
26
|
"driver",
|
|
25
27
|
"pipeline",
|
|
26
28
|
"query-builder",
|
|
@@ -28,11 +30,11 @@
|
|
|
28
30
|
"transactions",
|
|
29
31
|
"prepared-statements"
|
|
30
32
|
],
|
|
31
|
-
"author": "
|
|
33
|
+
"author": "M2Kc-s4",
|
|
32
34
|
"license": "MIT",
|
|
33
|
-
"homepage": "https://github.com/
|
|
35
|
+
"homepage": "https://github.com/M2Kc-s4/pgtx",
|
|
34
36
|
"bugs": {
|
|
35
|
-
"url": "https://github.com/
|
|
37
|
+
"url": "https://github.com/M2Kc-s4/pgtx/issues"
|
|
36
38
|
},
|
|
37
39
|
"exports": {
|
|
38
40
|
".": {
|