@m2k-5f/pgtx 2.3.1 → 2.3.3
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/connection.d.ts +4 -0
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +23 -5
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -2
- package/dist/protocol/connection-request-writer.js +1 -1
- package/dist/protocol/connection-response-reader.d.ts +11 -1
- package/dist/protocol/connection-response-reader.d.ts.map +1 -1
- package/dist/protocol/connection-response-reader.js +134 -8
- package/dist/protocol/constants.d.ts +48 -0
- package/dist/protocol/constants.d.ts.map +1 -1
- package/dist/protocol/constants.js +47 -0
- package/dist/query.d.ts +6 -3
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +12 -3
- package/dist/queue.js +1 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/connection.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export type ConnectionParams = {
|
|
|
10
10
|
port: number;
|
|
11
11
|
database: string;
|
|
12
12
|
logLevel?: LogLevel;
|
|
13
|
+
int8toBigint?: boolean;
|
|
13
14
|
};
|
|
14
15
|
export type ExecuteQueueUnit = {
|
|
15
16
|
rows: (string | null)[][];
|
|
@@ -68,8 +69,10 @@ export declare class Connection {
|
|
|
68
69
|
private _isReconnecting;
|
|
69
70
|
private _socket;
|
|
70
71
|
private _writer;
|
|
72
|
+
private _activeQuery;
|
|
71
73
|
private _pipelinesQueue;
|
|
72
74
|
private _described;
|
|
75
|
+
private _rowMappers;
|
|
73
76
|
private _describingPending;
|
|
74
77
|
private _parsed;
|
|
75
78
|
private _parsingPending;
|
|
@@ -77,6 +80,7 @@ export declare class Connection {
|
|
|
77
80
|
private _stmtCounter;
|
|
78
81
|
private _logLevel;
|
|
79
82
|
private _nextStatement;
|
|
83
|
+
private _getRowMapper;
|
|
80
84
|
private _checkOpened;
|
|
81
85
|
private constructor();
|
|
82
86
|
/**
|
package/dist/connection.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAK3C,OAAO,EAAQ,MAAM,EAAU,MAAM,eAAe,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAEvC,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,CAAA;CACzB,CAAA;AAMD,MAAM,MAAM,gBAAgB,GAAG;IAC3B,IAAI,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IACzB,OAAO,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAA;IAC7B,MAAM,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAA;IAC5B,aAAa,EAAE,aAAa,CAAA;CAC/B,CAAA;AAGD,MAAM,MAAM,gBAAgB,GAAG;IAC3B,OAAO,EAAE,CAAC,aAAa,EAAE,aAAa,KAAK,IAAI,CAAA;IAC/C,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAC9B,IAAI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,EAAE,gBAAgB;IAOnC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,KAAK,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,oBAAoB,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE;IAsBtF;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,KAAK,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC;IAmB7D;;;;;;;;;;OAUG;IACH,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,GAAE,MAAW;IAMhD;;;;;;;;;;OAUG;IACH,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI;IAc/D;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,CAAC,EAAE,EAAE,aAAa,CAAC;IAmB7F,OAAO,CAAC,YAAY;IAuDpB,OAAO,CAAC,WAAW;IAwBnB,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,MAAM;IAsBd,OAAO,CAAC,kBAAkB;IAM1B,OAAO,CAAC,qBAAqB;YAWf,UAAU;IAmBxB,OAAO,CAAC,qBAAqB;IAW7B,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,eAAe;IAYvB,OAAO,CAAC,aAAa;IAyJrB;;;OAGG;IACH,IAAI,QAAQ,YAEX;IAGD;;;;;;;;;OASG;IACH,KAAK;CAQR"}
|
package/dist/connection.js
CHANGED
|
@@ -2,7 +2,6 @@ import { nextTick } from "process";
|
|
|
2
2
|
import { ConnectionRequestWriter } from "./protocol/connection-request-writer";
|
|
3
3
|
import { createAuthorizedSocket } from "./protocol/socket-authorization";
|
|
4
4
|
import { ResponseTypes } from "./protocol/constants";
|
|
5
|
-
import { parseRowValues } from "./utils/value-parser";
|
|
6
5
|
import { compileSqlTemplate } from "./utils/template-compiler";
|
|
7
6
|
import { Transaction } from "./transaction";
|
|
8
7
|
import { SocketConnector } from "./protocol/socket-connector";
|
|
@@ -47,6 +46,15 @@ export class Connection {
|
|
|
47
46
|
_nextStatement() {
|
|
48
47
|
return `s-${this._stmtCounter++}`;
|
|
49
48
|
}
|
|
49
|
+
_getRowMapper(statementName, descriptions) {
|
|
50
|
+
let mapper = this._rowMappers.get(statementName);
|
|
51
|
+
if (mapper)
|
|
52
|
+
return mapper;
|
|
53
|
+
const fields = descriptions.map((desc, i) => `"${desc.name}": values[${i}]`).join(',\n ');
|
|
54
|
+
mapper = new Function('values', `return ${fields}`)();
|
|
55
|
+
this._rowMappers.set(statementName, mapper);
|
|
56
|
+
return mapper;
|
|
57
|
+
}
|
|
50
58
|
_checkOpened() {
|
|
51
59
|
if (!this.isOpened)
|
|
52
60
|
throw ErrConnectionClosed;
|
|
@@ -55,8 +63,10 @@ export class Connection {
|
|
|
55
63
|
this._isFlushing = false;
|
|
56
64
|
this._isOpened = true;
|
|
57
65
|
this._isReconnecting = false;
|
|
66
|
+
this._activeQuery = null;
|
|
58
67
|
this._pipelinesQueue = new Queue();
|
|
59
68
|
this._described = new Map();
|
|
69
|
+
this._rowMappers = new Map();
|
|
60
70
|
this._describingPending = new Set();
|
|
61
71
|
this._parsed = new Map();
|
|
62
72
|
this._parsingPending = new Map();
|
|
@@ -388,8 +398,15 @@ export class Connection {
|
|
|
388
398
|
break;
|
|
389
399
|
case ResponseTypes.DataRow:
|
|
390
400
|
{
|
|
391
|
-
|
|
392
|
-
query
|
|
401
|
+
let query = this._activeQuery;
|
|
402
|
+
if (!query) {
|
|
403
|
+
query = this._getCurrentQuery();
|
|
404
|
+
this._activeQuery = query;
|
|
405
|
+
}
|
|
406
|
+
if (!query.columns) {
|
|
407
|
+
query.columns = this._described.get(query.statementName);
|
|
408
|
+
}
|
|
409
|
+
query.push(reader.readDataRow(query.columns, this.params.int8toBigint));
|
|
393
410
|
}
|
|
394
411
|
break;
|
|
395
412
|
case ResponseTypes.ComandComplete:
|
|
@@ -399,7 +416,7 @@ export class Connection {
|
|
|
399
416
|
this.close();
|
|
400
417
|
break;
|
|
401
418
|
}
|
|
402
|
-
const query = this._getCurrentQuery();
|
|
419
|
+
const query = this._activeQuery || this._getCurrentQuery();
|
|
403
420
|
if (!query) {
|
|
404
421
|
this.close();
|
|
405
422
|
break;
|
|
@@ -409,7 +426,8 @@ export class Connection {
|
|
|
409
426
|
}
|
|
410
427
|
query.state = QueryState.Completed;
|
|
411
428
|
this._pipelinesQueue.get().next();
|
|
412
|
-
|
|
429
|
+
this._activeQuery = null;
|
|
430
|
+
query.resolve();
|
|
413
431
|
}
|
|
414
432
|
break;
|
|
415
433
|
case ResponseTypes.ErrorResponse:
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { Pool as PgtxPool } from "./pool";
|
|
|
2
2
|
import { IdentifierClause, InsertClause, ArrayClause, UpdateClause, ExcludeUpdateClause, WhereClause, LiteralClause, FragmentClause } from './clauses';
|
|
3
3
|
import { Connection } from "./connection";
|
|
4
4
|
import { Transaction } from "./transaction";
|
|
5
|
-
import { setTypeParser } from "./utils/value-parser";
|
|
6
5
|
/**
|
|
7
6
|
* Core SQL tagging utility for Pgtx.
|
|
8
7
|
* Provides type-safe helpers for building dynamic queries with recursive support.
|
|
@@ -120,6 +119,5 @@ export declare const sql: {
|
|
|
120
119
|
export { Connection as Connection };
|
|
121
120
|
export { Transaction as Transaction };
|
|
122
121
|
export { PgtxPool as Pool };
|
|
123
|
-
export { setTypeParser as setTypeParser };
|
|
124
122
|
export * from "./clauses";
|
|
125
123
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EACH,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,mBAAmB,EAEnB,WAAW,EACX,aAAa,EACb,cAAc,EACjB,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EACH,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,mBAAmB,EAEnB,WAAW,EACX,aAAa,EACb,cAAc,EACjB,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C;;;GAGG;AACH,eAAO,MAAM,GAAG;IACZ;;;;;;;;;;;OAWG;;IAGH;;;;;;OAMG;;IAGH;;;;;;OAMG;;IAGH;;;;;;;;OAQG;;IAGH;;;;;;;;;;;KAWC;;IAGD;;;;;;;;;;OAUG;;IAGH;;;;;;;OAOG;;IAGH;;;;;;;;OAQG;;IAGH;;;;;;;;;;;;;;;;;;;OAmBG;;CAEN,CAAA;AAGD;;;GAGG;AAEH,OAAO,EAAE,UAAU,IAAI,UAAU,EAAE,CAAA;AAEnC,OAAO,EAAE,WAAW,IAAI,WAAW,EAAE,CAAA;AAErC,OAAO,EAAE,QAAQ,IAAI,IAAI,EAAE,CAAA;AAG3B,cAAc,WAAW,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,6 @@ import { Pool as PgtxPool } from "./pool";
|
|
|
2
2
|
import { IdentifierClause, InsertClause, ArrayClause, UpdateClause, ExcludeUpdateClause, emptyClause, WhereClause, LiteralClause, FragmentClause, } from './clauses';
|
|
3
3
|
import { Connection } from "./connection";
|
|
4
4
|
import { Transaction } from "./transaction";
|
|
5
|
-
import { setTypeParser } from "./utils/value-parser";
|
|
6
5
|
/**
|
|
7
6
|
* Core SQL tagging utility for Pgtx.
|
|
8
7
|
* Provides type-safe helpers for building dynamic queries with recursive support.
|
|
@@ -120,5 +119,4 @@ export const sql = {
|
|
|
120
119
|
export { Connection as Connection };
|
|
121
120
|
export { Transaction as Transaction };
|
|
122
121
|
export { PgtxPool as Pool };
|
|
123
|
-
export { setTypeParser as setTypeParser };
|
|
124
122
|
export * from "./clauses";
|
|
@@ -110,7 +110,7 @@ export class ConnectionRequestWriter {
|
|
|
110
110
|
request.writeInt32(param ? Buffer.byteLength(param) : -1);
|
|
111
111
|
param && request.writeString(param);
|
|
112
112
|
});
|
|
113
|
-
request.writeInt16(
|
|
113
|
+
request.writeInt16(1).writeInt16(1).endRequest();
|
|
114
114
|
return this;
|
|
115
115
|
}
|
|
116
116
|
writeClose(name) {
|
|
@@ -14,8 +14,18 @@ export declare class ConnectionResponseBuffer {
|
|
|
14
14
|
readRawString(length: number): string;
|
|
15
15
|
readBytes(length: number): Buffer;
|
|
16
16
|
hasMore(): boolean;
|
|
17
|
+
readRawBinaryString(length: number): string;
|
|
18
|
+
readBinaryDate(): Date;
|
|
19
|
+
readBinaryTimestamp(): Date;
|
|
20
|
+
readBinaryTime(): string;
|
|
21
|
+
skipBytes(byteCount: number): void;
|
|
17
22
|
hasFullPacket(): boolean;
|
|
18
23
|
getResidualBuffer(): Buffer<ArrayBufferLike>;
|
|
24
|
+
readBool(): boolean;
|
|
25
|
+
readBigInt64(): bigint;
|
|
26
|
+
readInt64(): number;
|
|
27
|
+
readFloat64(): number;
|
|
28
|
+
getBufferHash(length: number): number;
|
|
19
29
|
}
|
|
20
30
|
export declare class ConnectionResponseReader {
|
|
21
31
|
private buffer;
|
|
@@ -38,7 +48,7 @@ export declare class ConnectionResponseReader {
|
|
|
38
48
|
readSaslMechanisms(): string[];
|
|
39
49
|
readSaslMessage(): string;
|
|
40
50
|
readRowDescription(): ColumnDescription[];
|
|
41
|
-
readDataRow():
|
|
51
|
+
readDataRow(descriptions: ColumnDescription[], int8toBigint?: boolean): Record<string, any>;
|
|
42
52
|
readNotificationResponse(): {
|
|
43
53
|
name: ChannelName;
|
|
44
54
|
payload: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection-response-reader.d.ts","sourceRoot":"","sources":["../../src/protocol/connection-response-reader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"connection-response-reader.d.ts","sourceRoot":"","sources":["../../src/protocol/connection-response-reader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAA6B,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC5G,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAM3C,qBAAa,wBAAwB;IAI7B,OAAO,CAAC,MAAM;IAHlB,OAAO,CAAC,KAAK,CAAI;IAEjB,OAAO;IAKP,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM;IAK1B,QAAQ,IAAI,MAAM;IAOlB,SAAS,IAAI,MAAM;IAOnB,SAAS,IAAI,MAAM;IAOnB,WAAW,IAAI,MAAM;IAQrB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAOrC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAOjC,OAAO,IAAI,OAAO;IAKlB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAO3C,cAAc,IAAI,IAAI;IAOtB,mBAAmB,IAAI,IAAI;IAO3B,cAAc,IAAI,MAAM;IAaxB,SAAS,CAAC,SAAS,EAAE,MAAM;IAK3B,aAAa,IAAI,OAAO;IAaxB,iBAAiB;IAIjB,QAAQ;IAMR,YAAY,IAAI,MAAM;IAOtB,SAAS;IAST,WAAW,IAAI,MAAM;IAMrB,aAAa,CAAC,MAAM,EAAE,MAAM;CAW/B;AAGD,qBAAa,wBAAwB;IAI7B,OAAO,CAAC,MAAM;IAHlB,OAAO,CAAC,mBAAmB,CAAK;IAEhC,OAAO;IAKP,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM;IAK1B,QAAQ,IAC6B,YAAY;IAIjD,kBAAkB,IAGoB,kBAAkB;IAIxD,WAAW;IAKX,mBAAmB;;;;IAUnB,kBAAkB;;;;IAUlB,iBAAiB,IAAI,aAAa;IA8ClC,iBAAiB,IAEoB,iBAAiB;IAItD,kBAAkB,IAAI,MAAM,EAAE;IAa9B,eAAe,IAAI,MAAM;IAOzB,kBAAkB;IAuBlB,WAAW,CAAC,YAAY,EAAE,iBAAiB,EAAE,EAAE,YAAY,GAAE,OAAe,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IA8FlG,wBAAwB;;;;IAUxB,mBAAmB,IAAI,MAAM;IAM7B,OAAO;IAKP,aAAa;IAKb,iBAAiB;IAKjB,iBAAiB;IAKjB,gBAAgB;IAKhB,wBAAwB;IAQxB,UAAU;CAGb"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { DataTypeOids } from "./constants";
|
|
1
2
|
import { PostgresError } from "../error";
|
|
3
|
+
const columnValueCache = new Map();
|
|
4
|
+
const POSTGRES_EPOCH_MS = 946684800000;
|
|
2
5
|
export class ConnectionResponseBuffer {
|
|
3
6
|
constructor(buffer) {
|
|
4
7
|
this.buffer = buffer;
|
|
@@ -41,6 +44,33 @@ export class ConnectionResponseBuffer {
|
|
|
41
44
|
hasMore() {
|
|
42
45
|
return this.caret < this.buffer.length;
|
|
43
46
|
}
|
|
47
|
+
readRawBinaryString(length) {
|
|
48
|
+
const text = this.buffer.toString('latin1', this.caret, this.caret + length);
|
|
49
|
+
this.caret += length;
|
|
50
|
+
return text;
|
|
51
|
+
}
|
|
52
|
+
readBinaryDate() {
|
|
53
|
+
const daysSince2000 = this.readInt32();
|
|
54
|
+
const ms = POSTGRES_EPOCH_MS + (daysSince2000 * 86400000);
|
|
55
|
+
return new Date(ms);
|
|
56
|
+
}
|
|
57
|
+
readBinaryTimestamp() {
|
|
58
|
+
const microSecondsSince2000 = this.readInt64();
|
|
59
|
+
const msSince2000 = Number(microSecondsSince2000 / 1000);
|
|
60
|
+
return new Date(POSTGRES_EPOCH_MS + msSince2000);
|
|
61
|
+
}
|
|
62
|
+
readBinaryTime() {
|
|
63
|
+
const microSecondsSinceMidnight = this.readInt64();
|
|
64
|
+
const totalMs = Number(microSecondsSinceMidnight / 1000);
|
|
65
|
+
const seconds = Math.floor(totalMs / 1000);
|
|
66
|
+
const ms = totalMs % 1000;
|
|
67
|
+
const minutes = Math.floor(seconds / 60);
|
|
68
|
+
const hours = Math.floor(minutes / 60);
|
|
69
|
+
return `${String(hours).padStart(2, '0')}:${String(minutes % 60).padStart(2, '0')}:${String(seconds % 60).padStart(2, '0')}.${String(ms).padStart(3, '0')}`;
|
|
70
|
+
}
|
|
71
|
+
skipBytes(byteCount) {
|
|
72
|
+
this.caret += byteCount;
|
|
73
|
+
}
|
|
44
74
|
hasFullPacket() {
|
|
45
75
|
const availableBytes = this.buffer.length - this.caret;
|
|
46
76
|
if (availableBytes < 5)
|
|
@@ -53,6 +83,36 @@ export class ConnectionResponseBuffer {
|
|
|
53
83
|
getResidualBuffer() {
|
|
54
84
|
return this.buffer.subarray(this.caret);
|
|
55
85
|
}
|
|
86
|
+
readBool() {
|
|
87
|
+
const value = this.buffer[this.caret] !== 0;
|
|
88
|
+
this.caret++;
|
|
89
|
+
return value;
|
|
90
|
+
}
|
|
91
|
+
readBigInt64() {
|
|
92
|
+
const value = this.buffer.readBigInt64BE(this.caret);
|
|
93
|
+
this.caret += 8;
|
|
94
|
+
return value;
|
|
95
|
+
}
|
|
96
|
+
readInt64() {
|
|
97
|
+
const hi = this.buffer.readInt32BE(this.caret);
|
|
98
|
+
const lo = this.buffer.readUInt32BE(this.caret + 4);
|
|
99
|
+
this.caret += 8;
|
|
100
|
+
return (hi * 4294967296) + lo;
|
|
101
|
+
}
|
|
102
|
+
readFloat64() {
|
|
103
|
+
const value = this.buffer.readDoubleBE(this.caret);
|
|
104
|
+
this.caret += 8;
|
|
105
|
+
return value;
|
|
106
|
+
}
|
|
107
|
+
getBufferHash(length) {
|
|
108
|
+
let hash = 2166136261;
|
|
109
|
+
const end = this.caret + length;
|
|
110
|
+
for (let i = this.caret; i < end; i++) {
|
|
111
|
+
hash ^= this.buffer[i];
|
|
112
|
+
hash += (hash << 1) + (hash << 4) + (hash << 7) + (hash << 8) + (hash << 24);
|
|
113
|
+
}
|
|
114
|
+
return hash >>> 0;
|
|
115
|
+
}
|
|
56
116
|
}
|
|
57
117
|
export class ConnectionResponseReader {
|
|
58
118
|
constructor(buffer) {
|
|
@@ -153,7 +213,7 @@ export class ConnectionResponseReader {
|
|
|
153
213
|
return this.buffer.readRawString(dataLength);
|
|
154
214
|
}
|
|
155
215
|
readRowDescription() {
|
|
156
|
-
this.buffer.
|
|
216
|
+
this.buffer.skipBytes(4);
|
|
157
217
|
const columnsCount = this.buffer.readInt16();
|
|
158
218
|
const columns = new Array(columnsCount);
|
|
159
219
|
for (let i = 0; i < columnsCount; i++) {
|
|
@@ -169,20 +229,86 @@ export class ConnectionResponseReader {
|
|
|
169
229
|
}
|
|
170
230
|
return columns;
|
|
171
231
|
}
|
|
172
|
-
readDataRow() {
|
|
173
|
-
this.buffer.
|
|
232
|
+
readDataRow(descriptions, int8toBigint = false) {
|
|
233
|
+
this.buffer.skipBytes(4);
|
|
174
234
|
const fieldsCount = this.buffer.readInt16();
|
|
175
|
-
const
|
|
235
|
+
const row = {};
|
|
176
236
|
for (let i = 0; i < fieldsCount; i++) {
|
|
177
237
|
const fieldLength = this.buffer.readInt32();
|
|
238
|
+
const desc = descriptions[i];
|
|
239
|
+
const key = desc ? desc.name : `col_${i}`;
|
|
178
240
|
if (fieldLength === -1) {
|
|
179
|
-
|
|
241
|
+
row[key] = null;
|
|
242
|
+
continue;
|
|
180
243
|
}
|
|
181
|
-
|
|
182
|
-
|
|
244
|
+
const oid = desc ? desc.typeOID : 0;
|
|
245
|
+
switch (oid) {
|
|
246
|
+
case DataTypeOids.Int4:
|
|
247
|
+
row[key] = this.buffer.readInt32();
|
|
248
|
+
break;
|
|
249
|
+
case DataTypeOids.Text:
|
|
250
|
+
case DataTypeOids.Varchar:
|
|
251
|
+
case DataTypeOids.Char:
|
|
252
|
+
{
|
|
253
|
+
if (fieldLength <= 32) {
|
|
254
|
+
let cacheForColumn = columnValueCache.get(i);
|
|
255
|
+
if (!cacheForColumn) {
|
|
256
|
+
cacheForColumn = new Map();
|
|
257
|
+
columnValueCache.set(i, cacheForColumn);
|
|
258
|
+
}
|
|
259
|
+
const byteHash = this.buffer.getBufferHash(fieldLength);
|
|
260
|
+
let cachedString = cacheForColumn.get(byteHash);
|
|
261
|
+
if (cachedString === undefined) {
|
|
262
|
+
cachedString = this.buffer.readRawString(fieldLength);
|
|
263
|
+
if (cacheForColumn.size < 512) {
|
|
264
|
+
cacheForColumn.set(byteHash, cachedString);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
else {
|
|
268
|
+
this.buffer.skipBytes(fieldLength);
|
|
269
|
+
}
|
|
270
|
+
row[key] = cachedString;
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
row[key] = this.buffer.readRawString(fieldLength);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
break;
|
|
277
|
+
case DataTypeOids.Int2:
|
|
278
|
+
row[key] = this.buffer.readInt16();
|
|
279
|
+
break;
|
|
280
|
+
case DataTypeOids.Bool:
|
|
281
|
+
row[key] = this.buffer.readBool();
|
|
282
|
+
break;
|
|
283
|
+
case DataTypeOids.Int8:
|
|
284
|
+
{
|
|
285
|
+
row[key] = int8toBigint ? this.buffer.readBigInt64() : this.buffer.readInt64();
|
|
286
|
+
}
|
|
287
|
+
break;
|
|
288
|
+
case DataTypeOids.Float8:
|
|
289
|
+
row[key] = this.buffer.readFloat64();
|
|
290
|
+
break;
|
|
291
|
+
case DataTypeOids.Jsonb:
|
|
292
|
+
this.buffer.skipBytes(1);
|
|
293
|
+
row[key] = JSON.parse(this.buffer.readRawString(fieldLength - 1));
|
|
294
|
+
break;
|
|
295
|
+
case DataTypeOids.Json:
|
|
296
|
+
row[key] = JSON.parse(this.buffer.readRawString(fieldLength));
|
|
297
|
+
break;
|
|
298
|
+
case DataTypeOids.Date:
|
|
299
|
+
row[key] = this.buffer.readBinaryDate();
|
|
300
|
+
break;
|
|
301
|
+
case DataTypeOids.Timestamp:
|
|
302
|
+
case DataTypeOids.Timestamptz:
|
|
303
|
+
row[key] = this.buffer.readBinaryTimestamp();
|
|
304
|
+
break;
|
|
305
|
+
default:
|
|
306
|
+
this.buffer.skipBytes(fieldLength);
|
|
307
|
+
row[key] = null;
|
|
308
|
+
break;
|
|
183
309
|
}
|
|
184
310
|
}
|
|
185
|
-
return
|
|
311
|
+
return row;
|
|
186
312
|
}
|
|
187
313
|
readNotificationResponse() {
|
|
188
314
|
this.buffer.readInt32();
|
|
@@ -28,6 +28,54 @@ export declare const ResponseTypes: {
|
|
|
28
28
|
readonly Notice: "N";
|
|
29
29
|
readonly NotificationResponse: "A";
|
|
30
30
|
};
|
|
31
|
+
export declare const DataTypeOids: {
|
|
32
|
+
readonly Bool: 16;
|
|
33
|
+
readonly Bytea: 17;
|
|
34
|
+
readonly Char: 18;
|
|
35
|
+
readonly Name: 19;
|
|
36
|
+
readonly Text: 25;
|
|
37
|
+
readonly Varchar: 1043;
|
|
38
|
+
readonly Bpchar: 1042;
|
|
39
|
+
readonly Int2: 21;
|
|
40
|
+
readonly Int4: 23;
|
|
41
|
+
readonly Int8: 20;
|
|
42
|
+
readonly Float4: 700;
|
|
43
|
+
readonly Float8: 701;
|
|
44
|
+
readonly Numeric: 1700;
|
|
45
|
+
readonly Timestamp: 1114;
|
|
46
|
+
readonly Timestamptz: 1184;
|
|
47
|
+
readonly Date: 1082;
|
|
48
|
+
readonly Time: 1083;
|
|
49
|
+
readonly Timetz: 1266;
|
|
50
|
+
readonly Interval: 1186;
|
|
51
|
+
readonly Json: 114;
|
|
52
|
+
readonly Jsonb: 3802;
|
|
53
|
+
readonly Uuid: 2950;
|
|
54
|
+
readonly Cidr: 650;
|
|
55
|
+
readonly Inet: 869;
|
|
56
|
+
readonly Macaddr: 829;
|
|
57
|
+
readonly Oid: 26;
|
|
58
|
+
readonly Xid: 28;
|
|
59
|
+
readonly Cid: 29;
|
|
60
|
+
readonly Regproc: 24;
|
|
61
|
+
readonly Point: 600;
|
|
62
|
+
readonly Lseg: 601;
|
|
63
|
+
readonly Path: 602;
|
|
64
|
+
readonly Box: 603;
|
|
65
|
+
readonly Polygon: 604;
|
|
66
|
+
readonly Line: 628;
|
|
67
|
+
readonly BoolArray: 1000;
|
|
68
|
+
readonly Int2Array: 1005;
|
|
69
|
+
readonly Int4Array: 1007;
|
|
70
|
+
readonly Int8Array: 1016;
|
|
71
|
+
readonly TextArray: 1009;
|
|
72
|
+
readonly VarcharArray: 1015;
|
|
73
|
+
readonly JsonArray: 199;
|
|
74
|
+
readonly JsonbArray: 3807;
|
|
75
|
+
readonly UuidArray: 2951;
|
|
76
|
+
readonly NumericArray: 1231;
|
|
77
|
+
};
|
|
78
|
+
export type DataTypeOid = typeof DataTypeOids[keyof typeof DataTypeOids];
|
|
31
79
|
export type ResponseType = ValueOF<typeof ResponseTypes>;
|
|
32
80
|
export declare const AuthenticationCodes: {
|
|
33
81
|
readonly Ok: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/protocol/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM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,mBAAmB,CAAC,CAAA"}
|
|
@@ -26,6 +26,53 @@ export const ResponseTypes = {
|
|
|
26
26
|
Notice: "N",
|
|
27
27
|
NotificationResponse: "A"
|
|
28
28
|
};
|
|
29
|
+
export const DataTypeOids = {
|
|
30
|
+
Bool: 16,
|
|
31
|
+
Bytea: 17,
|
|
32
|
+
Char: 18,
|
|
33
|
+
Name: 19,
|
|
34
|
+
Text: 25,
|
|
35
|
+
Varchar: 1043,
|
|
36
|
+
Bpchar: 1042,
|
|
37
|
+
Int2: 21,
|
|
38
|
+
Int4: 23,
|
|
39
|
+
Int8: 20,
|
|
40
|
+
Float4: 700,
|
|
41
|
+
Float8: 701,
|
|
42
|
+
Numeric: 1700,
|
|
43
|
+
Timestamp: 1114,
|
|
44
|
+
Timestamptz: 1184,
|
|
45
|
+
Date: 1082,
|
|
46
|
+
Time: 1083,
|
|
47
|
+
Timetz: 1266,
|
|
48
|
+
Interval: 1186,
|
|
49
|
+
Json: 114,
|
|
50
|
+
Jsonb: 3802,
|
|
51
|
+
Uuid: 2950,
|
|
52
|
+
Cidr: 650,
|
|
53
|
+
Inet: 869,
|
|
54
|
+
Macaddr: 829,
|
|
55
|
+
Oid: 26,
|
|
56
|
+
Xid: 28,
|
|
57
|
+
Cid: 29,
|
|
58
|
+
Regproc: 24,
|
|
59
|
+
Point: 600,
|
|
60
|
+
Lseg: 601,
|
|
61
|
+
Path: 602,
|
|
62
|
+
Box: 603,
|
|
63
|
+
Polygon: 604,
|
|
64
|
+
Line: 628,
|
|
65
|
+
BoolArray: 1000,
|
|
66
|
+
Int2Array: 1005,
|
|
67
|
+
Int4Array: 1007,
|
|
68
|
+
Int8Array: 1016,
|
|
69
|
+
TextArray: 1009,
|
|
70
|
+
VarcharArray: 1015,
|
|
71
|
+
JsonArray: 199,
|
|
72
|
+
JsonbArray: 3807,
|
|
73
|
+
UuidArray: 2951,
|
|
74
|
+
NumericArray: 1231
|
|
75
|
+
};
|
|
29
76
|
export const AuthenticationCodes = {
|
|
30
77
|
Ok: 0,
|
|
31
78
|
CleartextPassword: 3,
|
package/dist/query.d.ts
CHANGED
|
@@ -15,10 +15,13 @@ export declare class Query<T> {
|
|
|
15
15
|
statementName: StatementName;
|
|
16
16
|
columns?: ColumnDescription[] | undefined;
|
|
17
17
|
promise: Promise<T[]>;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
private _resolve;
|
|
19
|
+
private _reject;
|
|
20
|
+
private _rows;
|
|
21
21
|
constructor(text: QueryText, args: (string | null)[], state: State, statementName: StatementName, columns?: ColumnDescription[] | undefined);
|
|
22
22
|
setState(state: State): void;
|
|
23
|
+
push(value: T): void;
|
|
24
|
+
reject(cause: Error): void;
|
|
25
|
+
resolve(): void;
|
|
23
26
|
}
|
|
24
27
|
//# sourceMappingURL=query.d.ts.map
|
package/dist/query.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../src/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGrD,eAAO,MAAM,UAAU;;;;;;CAMb,CAAA;AAGV,MAAM,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,UAAU,CAAC,CAAA;AAG9C,qBAAa,KAAK,CAAC,CAAC;IAOL,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE;IACvB,KAAK,EAAE,KAAK;IACZ,aAAa,EAAE,aAAa;IAC5B,OAAO,CAAC,EAAE,iBAAiB,EAAE;IAVxC,OAAO,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAA;IACrB,OAAO,
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../src/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGrD,eAAO,MAAM,UAAU;;;;;;CAMb,CAAA;AAGV,MAAM,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,UAAU,CAAC,CAAA;AAG9C,qBAAa,KAAK,CAAC,CAAC;IAOL,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE;IACvB,KAAK,EAAE,KAAK;IACZ,aAAa,EAAE,aAAa;IAC5B,OAAO,CAAC,EAAE,iBAAiB,EAAE;IAVxC,OAAO,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAA;IACrB,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,OAAO,CAAyB;IACxC,OAAO,CAAC,KAAK,CAAU;gBAGZ,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,EACvB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,EAC5B,OAAO,CAAC,EAAE,iBAAiB,EAAE,YAAA;IAQxC,QAAQ,CAAC,KAAK,EAAE,KAAK;IAKrB,IAAI,CAAC,KAAK,EAAE,CAAC;IAIb,MAAM,CAAC,KAAK,EAAE,KAAK;IAKnB,OAAO;CAGV"}
|
package/dist/query.js
CHANGED
|
@@ -12,13 +12,22 @@ export class Query {
|
|
|
12
12
|
this.state = state;
|
|
13
13
|
this.statementName = statementName;
|
|
14
14
|
this.columns = columns;
|
|
15
|
-
this.
|
|
15
|
+
this._rows = [];
|
|
16
16
|
this.promise = new Promise((a, b) => {
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
17
|
+
this._resolve = a;
|
|
18
|
+
this._reject = b;
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
setState(state) {
|
|
22
22
|
this.state = state;
|
|
23
23
|
}
|
|
24
|
+
push(value) {
|
|
25
|
+
this._rows.push(value);
|
|
26
|
+
}
|
|
27
|
+
reject(cause) {
|
|
28
|
+
this._reject(cause);
|
|
29
|
+
}
|
|
30
|
+
resolve() {
|
|
31
|
+
this._resolve(this._rows);
|
|
32
|
+
}
|
|
24
33
|
}
|
package/dist/queue.js
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DataTypeOid } from "./protocol/constants";
|
|
1
2
|
export type PreparedStatement<TResult extends any, Tparams extends any[]> = {
|
|
2
3
|
text: string;
|
|
3
4
|
name: string;
|
|
@@ -17,7 +18,7 @@ export type CompileSQLParams = {
|
|
|
17
18
|
};
|
|
18
19
|
export type ColumnDescription = {
|
|
19
20
|
name: string;
|
|
20
|
-
typeOID:
|
|
21
|
+
typeOID: DataTypeOid;
|
|
21
22
|
};
|
|
22
23
|
export type Branded<T, Brand> = T & {
|
|
23
24
|
__brand: Brand;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,CAAC,OAAO,SAAS,GAAG,EAAE,OAAO,SAAS,GAAG,EAAE,IAAI;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC,CAAA;CACpD,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;CAC3B,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IAC/B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,GAAG,EAAE,CAAC;CACf,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC3B,SAAS,EAA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