@m2k-5f/pgtx 2.5.4 → 2.6.1
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 -81
- package/dist/batch.d.ts +14 -0
- package/dist/batch.d.ts.map +1 -0
- package/dist/batch.js +34 -0
- package/dist/clauses/abstract.clause.d.ts.map +1 -1
- package/dist/connection.d.ts +10 -34
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +162 -215
- package/dist/error.d.ts +8 -0
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/pool.d.ts +7 -12
- package/dist/pool.d.ts.map +1 -1
- package/dist/pool.js +23 -24
- package/dist/protocol/connection-request-writer.d.ts.map +1 -1
- package/dist/protocol/connection-request-writer.js +1 -0
- package/dist/protocol/connection-response-reader.d.ts +2 -4
- package/dist/protocol/connection-response-reader.d.ts.map +1 -1
- package/dist/protocol/connection-response-reader.js +1 -2
- package/dist/protocol/socket-authorization.d.ts +1 -10
- package/dist/protocol/socket-authorization.d.ts.map +1 -1
- package/dist/protocol/socket-authorization.js +1 -4
- package/dist/protocol/socket-connector.d.ts.map +1 -1
- package/dist/protocol/socket-connector.js +0 -2
- package/dist/query.d.ts +25 -27
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +36 -35
- package/dist/transaction.d.ts +3 -4
- package/dist/transaction.d.ts.map +1 -1
- package/dist/transaction.js +13 -11
- package/dist/types.d.ts +52 -11
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/template-compiler.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -64,83 +64,65 @@
|
|
|
64
64
|
- **Connection pool** — Auto-management connections with support for pipeline queries via the pool itself.
|
|
65
65
|
- **Zero dependencies** — Lightweight and blazing
|
|
66
66
|
|
|
67
|
-
---
|
|
67
|
+
---
|
|
68
68
|
|
|
69
|
-
## ⚡ Performance
|
|
69
|
+
## ⚡ Performance
|
|
70
70
|
|
|
71
|
-
All benchmarks are executed on **GitHub Actions** (Ubuntu, 2 vCPUs) and are fully reproducible. Benchmark sources are included in this repository.
|
|
71
|
+
All benchmarks are executed on **GitHub Actions** (Ubuntu, 2 vCPUs) and are fully reproducible. Benchmark sources are included in this repository.
|
|
72
72
|
|
|
73
|
-
### 1. PostgreSQL Pipeline Stress Test
|
|
73
|
+
### 1. PostgreSQL Pipeline Stress Test
|
|
74
74
|
|
|
75
|
-
**3000 concurrent parameterized `SELECT` queries**
|
|
75
|
+
**3000 concurrent parameterized `SELECT` queries**
|
|
76
76
|
|
|
77
|
-
* Connection pool: **10 connections**
|
|
78
|
-
* Measured with **mitata**
|
|
77
|
+
* Connection pool: **10 connections**
|
|
78
|
+
* Measured with **mitata**
|
|
79
79
|
|
|
80
|
-
| Driver | Avg Time | Relative Speed | Memory (p75) |
|
|
81
|
-
| :--------------------- | -----------: | -------------------: | -----------: |
|
|
82
|
-
| **Pgtx (Pipeline)** | **24.18 ms** | **Baseline (1.00×)** | **≈2.5 MB** |
|
|
83
|
-
| Postgres.js (Pipeline) | 83.36 ms | **3.45× slower** | ≈7.6 MB |
|
|
84
|
-
| node-postgres (`pg`) | 377.95 ms | **15.63× slower** | ≈11.4 MB |
|
|
80
|
+
| Driver | Avg Time | Relative Speed | Memory (p75) |
|
|
81
|
+
| :--------------------- | -----------: | -------------------: | -----------: |
|
|
82
|
+
| **Pgtx (Pipeline)** | **24.18 ms** | **Baseline (1.00×)** | **≈2.5 MB** |
|
|
83
|
+
| Postgres.js (Pipeline) | 83.36 ms | **3.45× slower** | ≈7.6 MB |
|
|
84
|
+
| node-postgres (`pg`) | 377.95 ms | **15.63× slower** | ≈11.4 MB |
|
|
85
85
|
|
|
86
|
-
### 2. Real-World HTTP Throughput
|
|
86
|
+
### 2. Real-World HTTP Throughput
|
|
87
87
|
|
|
88
|
-
Simple `node:http` server serving a PostgreSQL-backed endpoint.
|
|
88
|
+
Simple `node:http` server serving a PostgreSQL-backed endpoint.
|
|
89
89
|
|
|
90
|
-
Measured with:
|
|
90
|
+
Measured with:
|
|
91
91
|
|
|
92
|
-
```bash
|
|
93
|
-
wrk -t2 -c<N> -d10s http://localhost:3000/users
|
|
94
|
-
```
|
|
92
|
+
```bash
|
|
93
|
+
wrk -t2 -c<N> -d10s http://localhost:3000/users
|
|
94
|
+
```
|
|
95
95
|
|
|
96
|
-
| Concurrent Connections | Pgtx | Postgres.js | Speedup |
|
|
97
|
-
| ---------------------: | ---------------: | -----------: | --------: |
|
|
98
|
-
| 50 | 5,272 req/s | 5,691 req/s | 0.93× |
|
|
99
|
-
| 200 | **12,918 req/s** | 6,724 req/s | **1.92×** |
|
|
100
|
-
| 1000 | **21,429 req/s** | 8,423 req/s | **2.54×** |
|
|
101
|
-
| 10000 | **22,486 req/s** | 12,764 req/s | **1.76×** |
|
|
96
|
+
| Concurrent Connections | Pgtx | Postgres.js | Speedup |
|
|
97
|
+
| ---------------------: | ---------------: | -----------: | --------: |
|
|
98
|
+
| 50 | 5,272 req/s | 5,691 req/s | 0.93× |
|
|
99
|
+
| 200 | **12,918 req/s** | 6,724 req/s | **1.92×** |
|
|
100
|
+
| 1000 | **21,429 req/s** | 8,423 req/s | **2.54×** |
|
|
101
|
+
| 10000 | **22,486 req/s** | 12,764 req/s | **1.76×** |
|
|
102
102
|
|
|
103
|
-
### Why is Pgtx fast?
|
|
103
|
+
### Why is Pgtx fast?
|
|
104
104
|
|
|
105
|
-
Pgtx is engineered for **throughput**, not for minimizing the latency of individual queries.
|
|
105
|
+
Pgtx is engineered for **throughput**, not for minimizing the latency of individual queries.
|
|
106
106
|
|
|
107
|
-
Instead of optimizing a single request in isolation, Pgtx minimizes per-query overhead under sustained concurrent load by combining:
|
|
107
|
+
Instead of optimizing a single request in isolation, Pgtx minimizes per-query overhead under sustained concurrent load by combining:
|
|
108
108
|
|
|
109
|
-
* Pipeline query multiplexing
|
|
110
|
-
* Synchronous PostgreSQL wire protocol encoding
|
|
111
|
-
* Batched socket writes
|
|
112
|
-
* Automatic prepared statement caching
|
|
113
|
-
* Prepared statement deduplication
|
|
114
|
-
* Row description caching
|
|
115
|
-
* Binary protocol support
|
|
116
|
-
* Zero-dependency implementation
|
|
109
|
+
* Pipeline query multiplexing
|
|
110
|
+
* Synchronous PostgreSQL wire protocol encoding
|
|
111
|
+
* Batched socket writes
|
|
112
|
+
* Automatic prepared statement caching
|
|
113
|
+
* Prepared statement deduplication
|
|
114
|
+
* Row description caching
|
|
115
|
+
* Binary protocol support
|
|
116
|
+
* Zero-dependency implementation
|
|
117
117
|
|
|
118
|
-
As concurrency increases, these optimizations significantly reduce protocol overhead, allowing Pgtx to scale more efficiently than traditional PostgreSQL drivers.
|
|
118
|
+
As concurrency increases, these optimizations significantly reduce protocol overhead, allowing Pgtx to scale more efficiently than traditional PostgreSQL drivers.
|
|
119
119
|
|
|
120
|
-
In the `mitata` benchmark, Pgtx also demonstrated approximately **
|
|
120
|
+
In the `mitata` benchmark, Pgtx also demonstrated approximately **2× lower memory usage** than Postgres.js while processing the same workload, reducing allocation pressure and improving sustained throughput under heavy load.
|
|
121
121
|
|
|
122
|
-
> **Blazing** isn't just a tagline — it's backed by reproducible benchmarks.
|
|
122
|
+
> **Blazing** isn't just a tagline — it's backed by reproducible benchmarks.
|
|
123
123
|
|
|
124
124
|
---
|
|
125
125
|
|
|
126
|
-
## 🔥 Why Pgtx?
|
|
127
|
-
|
|
128
|
-
| Capability | **Pgtx** | **Postgres.js** | **pg** |
|
|
129
|
-
| -------------------------------- | :------: | :-------------: | :----: |
|
|
130
|
-
| Pipeline queries | ✅ | ✅ | ❌ |
|
|
131
|
-
| Pipeline multiplexing in pool | ✅ | ❌ | ❌ |
|
|
132
|
-
| Tagged template SQL | ✅ | ✅ | ❌ |
|
|
133
|
-
| Automatic prepared statements | ✅ | ✅ | ✅ |
|
|
134
|
-
| Prepared statement deduplication | ✅ | ❌ | ❌ |
|
|
135
|
-
| Transactions | ✅ | ✅ | ✅ |
|
|
136
|
-
| Savepoints | ✅ | ✅ | ❌ |
|
|
137
|
-
| LISTEN / NOTIFY | ✅ | ✅ | ✅ |
|
|
138
|
-
| Connection pool | ✅ | ✅ | ✅ |
|
|
139
|
-
| Zero dependencies | ✅ | ✅ | ❌ |
|
|
140
|
-
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
|
|
144
126
|
## 📖 Features
|
|
145
127
|
|
|
146
128
|
### 🎯 Typed Error Handling
|
|
@@ -167,9 +149,9 @@ In the `mitata` benchmark, Pgtx also demonstrated approximately **3× lower memo
|
|
|
167
149
|
```typescript
|
|
168
150
|
// 5 queries, only 2 network round-trips
|
|
169
151
|
const {user, posts, ...data} = await Bind({
|
|
170
|
-
user:
|
|
171
|
-
config:
|
|
172
|
-
announcements:
|
|
152
|
+
user: pool.query<User>`...`,
|
|
153
|
+
config: pool.query<Config>`...`,
|
|
154
|
+
announcements: pool.query<Announcement>`...`
|
|
173
155
|
})
|
|
174
156
|
.bind({
|
|
175
157
|
posts: ({ user }) => pool.query<Post>`...`,
|
|
@@ -452,26 +434,28 @@ In the `mitata` benchmark, Pgtx also demonstrated approximately **3× lower memo
|
|
|
452
434
|
### Connection
|
|
453
435
|
```typescript
|
|
454
436
|
class Connection {
|
|
455
|
-
static new(params:
|
|
437
|
+
static new(params: ConnectionPartialParams): Promise<Connection>
|
|
456
438
|
|
|
457
439
|
query<T>(strings: TemplateStringsArray, ...values: any[]): Future<T[], PostgresError>
|
|
458
|
-
begin<T>(callback: (tx: Transaction) => Promise<T>): Future<T,
|
|
459
|
-
notify(channelName: string, payload?: string): Future<
|
|
460
|
-
listen(channelName: string, callback: (payload: string) => void): Future<
|
|
461
|
-
unlisten(channelName: string, callback: (payload: string) => void): Future<
|
|
440
|
+
begin<T>(callback: (tx: Transaction) => Promise<T>): Future<T, unknown>
|
|
441
|
+
notify(channelName: string, payload?: string): Future<void, PostgresError>
|
|
442
|
+
listen(channelName: string, callback: (payload: string) => void): Future<void, PostgresError>
|
|
443
|
+
unlisten(channelName: string, callback: (payload: string) => void): Future<void, PostgresError>
|
|
462
444
|
stream<T extends Record<string, any>>(templates: TemplateStringsArray, ...params: any[]): ReadableStream<T>
|
|
463
445
|
get isAlive(): boolean
|
|
464
446
|
close(): void
|
|
465
447
|
}
|
|
466
448
|
|
|
467
|
-
interface
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
449
|
+
interface ConnectionPartialParams {
|
|
450
|
+
user: string
|
|
451
|
+
password?: string
|
|
452
|
+
host: string
|
|
453
|
+
port: number
|
|
454
|
+
database: string
|
|
455
|
+
logLevel?: LogLevel, // default "error"
|
|
456
|
+
int8toBigint?: boolean, // default false
|
|
457
|
+
queryTimeout?: number // default 30000 (30 seconds)
|
|
458
|
+
syncShedule?: "Tick" | "Immediate" // default "Immediate"
|
|
475
459
|
}
|
|
476
460
|
```
|
|
477
461
|
|
|
@@ -479,14 +463,14 @@ In the `mitata` benchmark, Pgtx also demonstrated approximately **3× lower memo
|
|
|
479
463
|
|
|
480
464
|
```typescript
|
|
481
465
|
class Pool {
|
|
482
|
-
constructor(config:
|
|
466
|
+
constructor(config: PoolPartialConfig)
|
|
483
467
|
|
|
484
468
|
query<T>(strings: TemplateStringsArray, ...values: any[]): Future<T[], PostgresError>
|
|
485
|
-
begin<T>(callback: (tx: Transaction) => Promise<T>): Future<T,
|
|
486
|
-
notify(channelName: string, payload?: string): Future<
|
|
487
|
-
listen(channel: string, callback: (payload: string) => void): Future<() =>
|
|
469
|
+
begin<T>(callback: (tx: Transaction) => Promise<T>): Future<T, unknown>
|
|
470
|
+
notify(channelName: string, payload?: string): Future<void, PostgresError>
|
|
471
|
+
listen(channel: string, callback: (payload: string) => void): Future<() => Future<void, PostgresError>, PostgresError>
|
|
488
472
|
stream<T extends Record<string, any>>(templates: TemplateStringsArray, ...args: any[]): ReadableStream<T>
|
|
489
|
-
withAcquire<T>(fn: (conn: Connection) => Promise<T>): Future<T,
|
|
473
|
+
withAcquire<T>(fn: (conn: Connection) => Promise<T>): Future<T, unknown>
|
|
490
474
|
acquire(): Future<Connection, PostgresError>
|
|
491
475
|
release(conn: Connection): void
|
|
492
476
|
close(): void
|
|
@@ -495,7 +479,7 @@ In the `mitata` benchmark, Pgtx also demonstrated approximately **3× lower memo
|
|
|
495
479
|
get total(): number
|
|
496
480
|
}
|
|
497
481
|
|
|
498
|
-
interface
|
|
482
|
+
interface PoolPartialConfig extends ConnectionPartialConfig {
|
|
499
483
|
max?: number
|
|
500
484
|
}
|
|
501
485
|
```
|
|
@@ -505,9 +489,9 @@ In the `mitata` benchmark, Pgtx also demonstrated approximately **3× lower memo
|
|
|
505
489
|
```typescript
|
|
506
490
|
class Transaction {
|
|
507
491
|
query<T>(strings: TemplateStringsArray, ...values: any[]): Future<T[], PostgresError>
|
|
508
|
-
commit(): Future<
|
|
509
|
-
rollback(): Future<
|
|
510
|
-
savepoint<T>(name: string, callback: (tx: Transaction) => Promise<T>): Future<T,
|
|
492
|
+
commit(): Future<void, PostgresError>
|
|
493
|
+
rollback(): Future<void, PostgresError>
|
|
494
|
+
savepoint<T>(name: string, callback: (tx: Transaction) => Promise<T>): Future<T, unknown>
|
|
511
495
|
|
|
512
496
|
get isActive(): boolean
|
|
513
497
|
}
|
package/dist/batch.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PostgresError } from "./error";
|
|
2
|
+
import { ConnectionRequestWriter } from "./protocol/connection-request-writer";
|
|
3
|
+
import { PostgresQuery } from "./query";
|
|
4
|
+
export declare class Batch {
|
|
5
|
+
private _queryQueue;
|
|
6
|
+
private _buffer;
|
|
7
|
+
constructor(buffer: ConnectionRequestWriter);
|
|
8
|
+
registerQuery(query: PostgresQuery): void;
|
|
9
|
+
end(): ConnectionRequestWriter;
|
|
10
|
+
get current(): PostgresQuery;
|
|
11
|
+
next(): void;
|
|
12
|
+
reject(cause: PostgresError): void;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=batch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batch.d.ts","sourceRoot":"","sources":["../src/batch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAc,aAAa,EAAE,MAAM,SAAS,CAAC;AAGpD,qBAAa,KAAK;IACd,OAAO,CAAC,WAAW,CAAsB;IACzC,OAAO,CAAC,OAAO,CAAyB;gBAE5B,MAAM,EAAE,uBAAuB;IAK3C,aAAa,CAAC,KAAK,EAAE,aAAa;IAelC,GAAG;IAIH,IAAI,OAAO,kBAEV;IAED,IAAI;IAIJ,MAAM,CAAC,KAAK,EAAE,aAAa;CAK9B"}
|
package/dist/batch.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ParseQuery } from "./query";
|
|
2
|
+
import { Queue } from "./queue";
|
|
3
|
+
export class Batch {
|
|
4
|
+
constructor(buffer) {
|
|
5
|
+
this._queryQueue = new Queue();
|
|
6
|
+
this._buffer = buffer;
|
|
7
|
+
}
|
|
8
|
+
registerQuery(query) {
|
|
9
|
+
this._queryQueue.push(query);
|
|
10
|
+
if (query instanceof ParseQuery) {
|
|
11
|
+
this._buffer
|
|
12
|
+
.writeParse(query.statement, query.text)
|
|
13
|
+
.writeDescribe(query.statement);
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
this._buffer
|
|
17
|
+
.writeBind("", query.statement, query.args)
|
|
18
|
+
.writeExecute("");
|
|
19
|
+
}
|
|
20
|
+
end() {
|
|
21
|
+
return this._buffer.writeSync();
|
|
22
|
+
}
|
|
23
|
+
get current() {
|
|
24
|
+
return this._queryQueue.current;
|
|
25
|
+
}
|
|
26
|
+
next() {
|
|
27
|
+
this._queryQueue.next();
|
|
28
|
+
}
|
|
29
|
+
reject(cause) {
|
|
30
|
+
while (this._queryQueue.hasMore) {
|
|
31
|
+
this._queryQueue.shift.reject(cause);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstract.clause.d.ts","sourceRoot":"","sources":["../../src/clauses/abstract.clause.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"abstract.clause.d.ts","sourceRoot":"","sources":["../../src/clauses/abstract.clause.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,8BAAsB,MAAM;IACxB,QAAQ,CAAC,YAAY,CAAC,MAAM,EAAE,oBAAoB,GAAG,IAAI;CAC5D"}
|
package/dist/connection.d.ts
CHANGED
|
@@ -1,23 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ConnectionPartialConfig } from "./types";
|
|
2
2
|
import { Transaction } from "./transaction";
|
|
3
3
|
import { Future } from 'fluent-future';
|
|
4
4
|
import { PostgresError } from "./error";
|
|
5
|
-
type LogLevel = "none" | "error" | "notice" | "query";
|
|
6
|
-
export type ConnectionParams = {
|
|
7
|
-
user: string;
|
|
8
|
-
password?: string;
|
|
9
|
-
host: string;
|
|
10
|
-
port: number;
|
|
11
|
-
database: string;
|
|
12
|
-
logLevel?: LogLevel;
|
|
13
|
-
int8toBigint?: boolean;
|
|
14
|
-
queryTimeout?: number;
|
|
15
|
-
batchCapacity?: number;
|
|
16
|
-
flushShedule?: "nextTick" | "Immediate";
|
|
17
|
-
};
|
|
18
|
-
export type StatementName = Branded<string, 'StatementName'>;
|
|
19
|
-
export type QueryText = Branded<string, 'QueryText'>;
|
|
20
|
-
export type ChannelName = Branded<string, "ChannelName">;
|
|
21
5
|
/**
|
|
22
6
|
* Represents a single dedicated connection to the PostgreSQL database.
|
|
23
7
|
*
|
|
@@ -49,22 +33,18 @@ export type ChannelName = Branded<string, "ChannelName">;
|
|
|
49
33
|
* ```
|
|
50
34
|
*/
|
|
51
35
|
export declare class Connection {
|
|
52
|
-
private readonly
|
|
53
|
-
private
|
|
36
|
+
private readonly config;
|
|
37
|
+
private _activeBatch;
|
|
54
38
|
private _isOpened;
|
|
55
39
|
private _isReconnecting;
|
|
40
|
+
private _cachedBuffer;
|
|
56
41
|
private _socket;
|
|
57
|
-
private _writer;
|
|
58
42
|
private _batchQueue;
|
|
59
|
-
private _described;
|
|
60
|
-
private _describingPending;
|
|
61
43
|
private _parsed;
|
|
62
|
-
private
|
|
44
|
+
private _parsing;
|
|
63
45
|
private _listeningCallbacks;
|
|
64
46
|
private _stmtCounter;
|
|
65
|
-
private _logLevel;
|
|
66
47
|
private _nextStatement;
|
|
67
|
-
private _checkOpened;
|
|
68
48
|
private constructor();
|
|
69
49
|
/**
|
|
70
50
|
* Creates a new database connection.
|
|
@@ -84,7 +64,9 @@ export declare class Connection {
|
|
|
84
64
|
* })
|
|
85
65
|
* ```
|
|
86
66
|
*/
|
|
87
|
-
static new(
|
|
67
|
+
static new(config: ConnectionPartialConfig): Future<Connection, PostgresError>;
|
|
68
|
+
private _registerBatch;
|
|
69
|
+
private _sync;
|
|
88
70
|
/**
|
|
89
71
|
* Executes a query using tagged template literals.
|
|
90
72
|
*
|
|
@@ -143,7 +125,7 @@ export declare class Connection {
|
|
|
143
125
|
* await conn.notify('events', 'hello')
|
|
144
126
|
* ```
|
|
145
127
|
*/
|
|
146
|
-
notify(channelName: string, payload?: string): Future<
|
|
128
|
+
notify(channelName: string, payload?: string): Future<void, PostgresError>;
|
|
147
129
|
/**
|
|
148
130
|
* Subscribes a callback to a channel. Sends `LISTEN` on the first subscription.
|
|
149
131
|
*
|
|
@@ -195,17 +177,12 @@ export declare class Connection {
|
|
|
195
177
|
*/
|
|
196
178
|
stream<T extends Record<string, any>>(templates: TemplateStringsArray, ...params: any[]): ReadableStream<T>;
|
|
197
179
|
private _streamWithController;
|
|
198
|
-
private _createQuery;
|
|
199
|
-
private _createStream;
|
|
200
|
-
private _writeQuery;
|
|
201
|
-
private _registerFlush;
|
|
202
|
-
private _flush;
|
|
203
180
|
private _registerReconnect;
|
|
204
181
|
private _resetConnectionState;
|
|
205
182
|
private _reconnect;
|
|
206
183
|
private _restoreSubscriptions;
|
|
207
184
|
private _getCurrentQuery;
|
|
208
|
-
private
|
|
185
|
+
private _rejectAllBatches;
|
|
209
186
|
private _handlePacket;
|
|
210
187
|
/**
|
|
211
188
|
* Checks if the connection is still alive and usable.
|
|
@@ -224,5 +201,4 @@ export declare class Connection {
|
|
|
224
201
|
*/
|
|
225
202
|
close(): void;
|
|
226
203
|
}
|
|
227
|
-
export {};
|
|
228
204
|
//# sourceMappingURL=connection.d.ts.map
|
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":"AAMA,OAAO,EAA6D,uBAAuB,EAAuC,MAAM,SAAS,CAAA;AACjJ,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAK3C,OAAO,EAAS,MAAM,EAAM,MAAM,eAAe,CAAA;AACjD,OAAO,EAAkD,aAAa,EAAE,MAAM,SAAS,CAAA;AAKvF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,UAAU;IACnB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IAEzC,OAAO,CAAC,YAAY,CAAqB;IACzC,OAAO,CAAC,SAAS,CAAO;IACxB,OAAO,CAAC,eAAe,CAAQ;IAC/B,OAAO,CAAC,aAAa,CAAgC;IAErD,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,WAAW,CAA4B;IAE/C,OAAO,CAAC,OAAO,CAAkC;IACjD,OAAO,CAAC,QAAQ,CAAyD;IAEzE,OAAO,CAAC,mBAAmB,CAAyD;IACpF,OAAO,CAAC,YAAY,CAAI;IAGxB,OAAO,CAAC,cAAc;IAKtB,OAAO;IAYP;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,uBAAuB;IAe1C,OAAO,CAAC,cAAc;IAgBtB,OAAO,CAAC,KAAK;IA4Bb;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,KAAK,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,oBAAoB,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC,CAAC,EAAE,EAAE,aAAa,CAAC;IA2CnH;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,KAAK,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC;IAoB7D;;;;;;;;;;OAUG;IACH,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,GAAE,MAAW;IAQhD;;;;;;;;;;OAUG;IACH,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI;IAgB/D;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC;IAqB/F;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,oBAAoB,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE;IAqDvF,OAAO,CAAC,qBAAqB;IAoD7B,OAAO,CAAC,kBAAkB;IAM1B,OAAO,CAAC,qBAAqB;YASf,UAAU;IAgBxB,OAAO,CAAC,qBAAqB;IAW7B,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,aAAa;IAqHrB;;;OAGG;IACH,IAAI,QAAQ,YAEX;IAGD;;;;;;;;;OASG;IACH,KAAK;CAKR"}
|