@m2k-5f/pgtx 2.7.2 → 2.8.0
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/README.md +65 -37
- package/dist/batch.d.ts +4 -1
- package/dist/batch.d.ts.map +1 -1
- package/dist/batch.js +14 -7
- package/dist/clauses/fragment.clause.js +1 -1
- package/dist/connection.d.ts +17 -16
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +231 -175
- package/dist/error.d.ts +6 -1
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js +26 -7
- package/dist/pool.d.ts +1 -1
- package/dist/pool.d.ts.map +1 -1
- package/dist/pool.js +5 -3
- package/dist/protocol/connection-request-writer.d.ts +107 -11
- package/dist/protocol/connection-request-writer.d.ts.map +1 -1
- package/dist/protocol/connection-request-writer.js +442 -48
- package/dist/protocol/connection-response-reader.d.ts +75 -30
- package/dist/protocol/connection-response-reader.d.ts.map +1 -1
- package/dist/protocol/connection-response-reader.js +285 -289
- package/dist/protocol/constants.d.ts +37 -30
- package/dist/protocol/constants.d.ts.map +1 -1
- package/dist/protocol/constants.js +43 -37
- package/dist/protocol/socket-authorization.d.ts.map +1 -1
- package/dist/protocol/socket-authorization.js +3 -3
- package/dist/protocol/socket-connector.d.ts +4 -4
- package/dist/protocol/socket-connector.d.ts.map +1 -1
- package/dist/protocol/socket-connector.js +2 -2
- package/dist/protocol/types.d.ts +14 -0
- package/dist/protocol/types.d.ts.map +1 -0
- package/dist/protocol/types.js +264 -0
- package/dist/query.d.ts +34 -24
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +45 -30
- package/dist/queue.d.ts +1 -0
- package/dist/queue.d.ts.map +1 -1
- package/dist/queue.js +1 -0
- package/dist/types.d.ts +3 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/template-compiler.d.ts +5 -2
- package/dist/utils/template-compiler.d.ts.map +1 -1
- package/dist/utils/template-compiler.js +4 -1
- package/dist/utils.d.ts +8 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +73 -0
- package/package.json +2 -2
|
@@ -1,39 +1,29 @@
|
|
|
1
1
|
import { AuthenticationCode, ResponseType, TransactionStatus } from "./constants";
|
|
2
|
-
import { ChannelName, ColumnDescription } from "../types";
|
|
2
|
+
import { ChannelName, ColumnDescription, ParameterDescription } from "../types";
|
|
3
3
|
import { PostgresError } from "../error";
|
|
4
4
|
export declare class ConnectionResponseBuffer {
|
|
5
5
|
private buffer;
|
|
6
6
|
private caret;
|
|
7
7
|
private constructor();
|
|
8
8
|
static from(buffer: Buffer): ConnectionResponseBuffer;
|
|
9
|
+
hasMore(): boolean;
|
|
10
|
+
skipBytes(byteCount: number): void;
|
|
11
|
+
hasFullPacket(): boolean;
|
|
12
|
+
getResidualBuffer(): Buffer<ArrayBufferLike>;
|
|
9
13
|
readChar(): string;
|
|
10
14
|
readInt32(): number;
|
|
11
15
|
readInt16(): number;
|
|
12
16
|
readCString(): string;
|
|
13
17
|
readRawString(length: number): string;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
readBinaryDate(): Date;
|
|
17
|
-
readBinaryTimestamp(): Date;
|
|
18
|
-
readBinaryTime(): string;
|
|
19
|
-
skipBytes(byteCount: number): void;
|
|
20
|
-
hasFullPacket(): boolean;
|
|
21
|
-
getResidualBuffer(): Buffer<ArrayBufferLike>;
|
|
22
|
-
readBool(): boolean;
|
|
23
|
-
readBigInt64(): bigint;
|
|
24
|
-
readInt64(): number;
|
|
25
|
-
readNumeric(): string;
|
|
26
|
-
readBinaryTimetz(): string;
|
|
18
|
+
readUInt16(): number;
|
|
19
|
+
readUInt32(): number;
|
|
27
20
|
readFloat32(): number;
|
|
28
21
|
readFloat64(): number;
|
|
29
|
-
|
|
22
|
+
readByte(): number;
|
|
30
23
|
readBytes(length: number): Buffer<ArrayBuffer>;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
private buffer;
|
|
35
|
-
private constructor();
|
|
36
|
-
static from(buffer: Buffer): ConnectionResponseReader;
|
|
24
|
+
readBool(): boolean;
|
|
25
|
+
readBigInt64(): bigint;
|
|
26
|
+
readInt64(): number;
|
|
37
27
|
readType(): {
|
|
38
28
|
type: ResponseType;
|
|
39
29
|
length: number;
|
|
@@ -53,19 +43,74 @@ export declare class ConnectionResponseReader {
|
|
|
53
43
|
readSaslMechanisms(): string[];
|
|
54
44
|
readSaslMessage(length: number): string;
|
|
55
45
|
readRowDescription(): ColumnDescription[];
|
|
56
|
-
readDataRow(descriptions: ColumnDescription[], int8toBigint: boolean): Record<string, any>;
|
|
57
46
|
readNotificationResponse(): {
|
|
58
47
|
name: ChannelName;
|
|
59
48
|
payload: string;
|
|
60
49
|
};
|
|
61
50
|
readCommandComplete(): string;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
51
|
+
readParameterDescription(): ParameterDescription;
|
|
52
|
+
readBinaryDate(): Date;
|
|
53
|
+
readBinaryTimestamp(): Date;
|
|
54
|
+
readBinaryTime(): string;
|
|
55
|
+
readBinaryTimetz(): string;
|
|
56
|
+
readBinaryNumeric(): string;
|
|
57
|
+
readBinaryInterval(): {
|
|
58
|
+
months: number;
|
|
59
|
+
days: number;
|
|
60
|
+
microseconds: bigint;
|
|
61
|
+
};
|
|
62
|
+
readBinaryJson(fieldLength: number): unknown;
|
|
63
|
+
readBinaryJsonb(fieldLength: number): unknown;
|
|
64
|
+
readBinaryMacaddr(): string;
|
|
65
|
+
readBinaryOid(): number;
|
|
66
|
+
readBinaryXid(): number;
|
|
67
|
+
readBinaryCid(): number;
|
|
68
|
+
readBinaryRegproc(): number;
|
|
69
|
+
readBinaryLseg(): {
|
|
70
|
+
a: {
|
|
71
|
+
x: number;
|
|
72
|
+
y: number;
|
|
73
|
+
};
|
|
74
|
+
b: {
|
|
75
|
+
x: number;
|
|
76
|
+
y: number;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
readBinaryPath(): {
|
|
80
|
+
closed: boolean;
|
|
81
|
+
points: {
|
|
82
|
+
x: number;
|
|
83
|
+
y: number;
|
|
84
|
+
}[];
|
|
85
|
+
};
|
|
86
|
+
readBinaryBox(): {
|
|
87
|
+
high: {
|
|
88
|
+
x: number;
|
|
89
|
+
y: number;
|
|
90
|
+
};
|
|
91
|
+
low: {
|
|
92
|
+
x: number;
|
|
93
|
+
y: number;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
readBinaryPolygon(): {
|
|
97
|
+
points: {
|
|
98
|
+
x: number;
|
|
99
|
+
y: number;
|
|
100
|
+
}[];
|
|
101
|
+
};
|
|
102
|
+
readBinaryLine(): {
|
|
103
|
+
a: number;
|
|
104
|
+
b: number;
|
|
105
|
+
c: number;
|
|
106
|
+
};
|
|
107
|
+
readBinaryUuid(): string;
|
|
108
|
+
readBinaryArray(fieldLength: number, elementParser: (length: number) => any): any[];
|
|
109
|
+
readBinaryInet(fieldLength: number): string;
|
|
110
|
+
readBinaryPoint(): {
|
|
111
|
+
x: number;
|
|
112
|
+
y: number;
|
|
113
|
+
};
|
|
114
|
+
readDataRow(descriptions: ColumnDescription[], int8toBigint: boolean): Record<string, any>;
|
|
70
115
|
}
|
|
71
116
|
//# sourceMappingURL=connection-response-reader.d.ts.map
|
|
@@ -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,EAAyC,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AACxH,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAC/E,OAAO,EAAE,aA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