@qualithm/arrow-flight-sql-js 0.0.1 → 0.1.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 +160 -37
- package/dist/arrow.js +1 -1
- package/dist/arrow.js.map +1 -1
- package/dist/client.d.ts +165 -4
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +486 -46
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/metrics.d.ts +20 -16
- package/dist/metrics.d.ts.map +1 -1
- package/dist/metrics.js +12 -7
- package/dist/metrics.js.map +1 -1
- package/dist/pool.d.ts +1 -1
- package/dist/pool.d.ts.map +1 -1
- package/dist/pool.js +1 -1
- package/dist/pool.js.map +1 -1
- package/dist/proto.d.ts +2 -2
- package/dist/proto.d.ts.map +1 -1
- package/dist/proto.js +1 -1
- package/dist/proto.js.map +1 -1
- package/dist/query-builder.d.ts +362 -0
- package/dist/query-builder.d.ts.map +1 -1
- package/dist/query-builder.js +732 -2
- package/dist/query-builder.js.map +1 -1
- package/dist/retry.d.ts +2 -2
- package/dist/retry.d.ts.map +1 -1
- package/dist/retry.js +3 -3
- package/dist/retry.js.map +1 -1
- package/dist/types.d.ts +137 -58
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +25 -0
- package/dist/types.js.map +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -52,20 +52,27 @@ const client = new FlightSqlClient({
|
|
|
52
52
|
host: "localhost",
|
|
53
53
|
port: 31337,
|
|
54
54
|
tls: true,
|
|
55
|
-
token: "your-bearer-token"
|
|
55
|
+
auth: { type: "bearer", token: "your-bearer-token" }
|
|
56
56
|
})
|
|
57
57
|
|
|
58
|
+
// Connect to the server
|
|
59
|
+
await client.connect()
|
|
60
|
+
|
|
58
61
|
// Execute a query
|
|
59
|
-
const
|
|
62
|
+
const result = await client.query("SELECT * FROM my_table LIMIT 100")
|
|
60
63
|
|
|
61
64
|
// Process Arrow record batches
|
|
62
|
-
for await (const batch of stream) {
|
|
65
|
+
for await (const batch of result.stream()) {
|
|
63
66
|
console.log(`Received ${batch.numRows} rows`)
|
|
64
67
|
// batch is an Arrow RecordBatch
|
|
65
68
|
}
|
|
66
69
|
|
|
70
|
+
// Or collect all results into a table
|
|
71
|
+
const table = await result.collect()
|
|
72
|
+
console.log(`Total rows: ${table.numRows}`)
|
|
73
|
+
|
|
67
74
|
// Clean up
|
|
68
|
-
|
|
75
|
+
client.close()
|
|
69
76
|
```
|
|
70
77
|
|
|
71
78
|
## Connection Pooling
|
|
@@ -73,34 +80,127 @@ await client.close()
|
|
|
73
80
|
```typescript
|
|
74
81
|
import { FlightSqlPool } from "@qualithm/arrow-flight-sql-js"
|
|
75
82
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
83
|
+
// Create a pool with client and pool configuration
|
|
84
|
+
const pool = new FlightSqlPool(
|
|
85
|
+
// Client options
|
|
86
|
+
{
|
|
87
|
+
host: "localhost",
|
|
88
|
+
port: 31337,
|
|
89
|
+
tls: false,
|
|
90
|
+
auth: { type: "basic", username: "admin", password: "secret" }
|
|
91
|
+
},
|
|
92
|
+
// Pool options
|
|
93
|
+
{
|
|
94
|
+
minConnections: 2,
|
|
95
|
+
maxConnections: 10,
|
|
96
|
+
idleTimeoutMs: 30_000
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
// Initialize the pool (creates minConnections)
|
|
101
|
+
await pool.initialize()
|
|
84
102
|
|
|
85
103
|
// Acquire a client from the pool
|
|
86
104
|
const client = await pool.acquire()
|
|
87
105
|
try {
|
|
88
|
-
const
|
|
106
|
+
const result = await client.query("SELECT 1")
|
|
107
|
+
const table = await result.collect()
|
|
89
108
|
// ... process results
|
|
90
109
|
} finally {
|
|
91
110
|
// Return to pool
|
|
92
111
|
pool.release(client)
|
|
93
112
|
}
|
|
94
113
|
|
|
95
|
-
// Or use the convenience method
|
|
96
|
-
|
|
97
|
-
|
|
114
|
+
// Or use the convenience method (handles acquire/release automatically)
|
|
115
|
+
await pool.withConnection(async (client) => {
|
|
116
|
+
const result = await client.query("SELECT * FROM users")
|
|
117
|
+
return result.collect()
|
|
98
118
|
})
|
|
99
119
|
|
|
100
120
|
// Graceful shutdown
|
|
101
121
|
await pool.close()
|
|
102
122
|
```
|
|
103
123
|
|
|
124
|
+
## Real-Time Subscriptions
|
|
125
|
+
|
|
126
|
+
Subscribe to live data updates using the `DoExchange` bidirectional streaming protocol:
|
|
127
|
+
|
|
128
|
+
```typescript
|
|
129
|
+
import { FlightSqlClient, SubscriptionMode } from "@qualithm/arrow-flight-sql-js"
|
|
130
|
+
|
|
131
|
+
const client = new FlightSqlClient({
|
|
132
|
+
host: "localhost",
|
|
133
|
+
port: 31337,
|
|
134
|
+
tls: true,
|
|
135
|
+
auth: { type: "bearer", token: "your-bearer-token" }
|
|
136
|
+
})
|
|
137
|
+
|
|
138
|
+
await client.connect()
|
|
139
|
+
|
|
140
|
+
// Subscribe to real-time updates
|
|
141
|
+
const subscription = client.subscribe("SELECT * FROM events WHERE status = 'pending'", {
|
|
142
|
+
mode: SubscriptionMode.ChangesOnly, // Full | ChangesOnly | Tail
|
|
143
|
+
heartbeatMs: 30_000 // Server heartbeat interval
|
|
144
|
+
})
|
|
145
|
+
|
|
146
|
+
// Consume batches as they arrive
|
|
147
|
+
for await (const batch of subscription) {
|
|
148
|
+
console.log(`Received ${batch.numRows} rows`)
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Or with cancellation
|
|
152
|
+
const controller = new AbortController()
|
|
153
|
+
const cancelableSubscription = client.subscribe(query, {
|
|
154
|
+
signal: controller.signal,
|
|
155
|
+
autoReconnect: true,
|
|
156
|
+
maxReconnectAttempts: 10
|
|
157
|
+
})
|
|
158
|
+
|
|
159
|
+
// Later: cancel the subscription
|
|
160
|
+
controller.abort()
|
|
161
|
+
|
|
162
|
+
// Or manually unsubscribe
|
|
163
|
+
await cancelableSubscription.unsubscribe()
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Subscription Options
|
|
167
|
+
|
|
168
|
+
| Option | Default | Description |
|
|
169
|
+
| ---------------------- | ------------- | -------------------------------------------------- |
|
|
170
|
+
| `mode` | `ChangesOnly` | Subscription mode (Full, ChangesOnly, Tail) |
|
|
171
|
+
| `heartbeatMs` | `30000` | Server heartbeat interval in milliseconds |
|
|
172
|
+
| `signal` | - | AbortSignal for cancellation |
|
|
173
|
+
| `autoReconnect` | `true` | Auto-reconnect on connection loss |
|
|
174
|
+
| `maxReconnectAttempts` | `10` | Maximum reconnection attempts |
|
|
175
|
+
| `reconnectDelayMs` | `1000` | Initial reconnect delay |
|
|
176
|
+
| `maxReconnectDelayMs` | `30000` | Maximum reconnect delay (with exponential backoff) |
|
|
177
|
+
|
|
178
|
+
### Low-Level DoExchange
|
|
179
|
+
|
|
180
|
+
For custom bidirectional protocols:
|
|
181
|
+
|
|
182
|
+
```typescript
|
|
183
|
+
const exchange = client.doExchange({
|
|
184
|
+
type: DescriptorType.CMD,
|
|
185
|
+
cmd: new TextEncoder().encode("CUSTOM_COMMAND")
|
|
186
|
+
})
|
|
187
|
+
|
|
188
|
+
// Send data to server
|
|
189
|
+
await exchange.send({
|
|
190
|
+
dataHeader: new Uint8Array(),
|
|
191
|
+
dataBody: new Uint8Array(),
|
|
192
|
+
appMetadata: new TextEncoder().encode(JSON.stringify({ action: "subscribe" }))
|
|
193
|
+
})
|
|
194
|
+
|
|
195
|
+
// Receive data from server
|
|
196
|
+
for await (const data of exchange) {
|
|
197
|
+
console.log("Received:", data)
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// Half-close (signal end of client stream)
|
|
201
|
+
await exchange.end()
|
|
202
|
+
```
|
|
203
|
+
|
|
104
204
|
## Observability & Metrics
|
|
105
205
|
|
|
106
206
|
Integrate with your observability stack using the metrics handler interface:
|
|
@@ -118,6 +218,8 @@ import {
|
|
|
118
218
|
const client = new FlightSqlClient({
|
|
119
219
|
host: "localhost",
|
|
120
220
|
port: 31337,
|
|
221
|
+
tls: false,
|
|
222
|
+
auth: { type: "none" },
|
|
121
223
|
metrics: new ConsoleMetricsHandler()
|
|
122
224
|
})
|
|
123
225
|
// Output: [FlightSQL Metrics] ✓ query success (42ms)
|
|
@@ -127,11 +229,15 @@ const metricsHandler = new InMemoryMetricsHandler()
|
|
|
127
229
|
const testClient = new FlightSqlClient({
|
|
128
230
|
host: "localhost",
|
|
129
231
|
port: 31337,
|
|
232
|
+
tls: false,
|
|
233
|
+
auth: { type: "none" },
|
|
130
234
|
metrics: metricsHandler
|
|
131
235
|
})
|
|
132
236
|
|
|
133
237
|
// Query metrics after operations
|
|
134
|
-
await testClient.
|
|
238
|
+
await testClient.connect()
|
|
239
|
+
const result = await testClient.query("SELECT 1")
|
|
240
|
+
await result.collect()
|
|
135
241
|
console.log(metricsHandler.getAverageDuration("query"))
|
|
136
242
|
console.log(metricsHandler.getErrorRate("query"))
|
|
137
243
|
console.log(metricsHandler.getSummary())
|
|
@@ -181,7 +287,8 @@ import {
|
|
|
181
287
|
} from "@qualithm/arrow-flight-sql-js"
|
|
182
288
|
|
|
183
289
|
try {
|
|
184
|
-
await client.
|
|
290
|
+
const result = await client.query("SELECT * FROM missing_table")
|
|
291
|
+
await result.collect()
|
|
185
292
|
} catch (error) {
|
|
186
293
|
if (error instanceof QueryError) {
|
|
187
294
|
console.error("SQL Error:", error.message)
|
|
@@ -205,6 +312,8 @@ import { FlightSqlClient, RetryPolicy, retryPolicies } from "@qualithm/arrow-fli
|
|
|
205
312
|
const client = new FlightSqlClient({
|
|
206
313
|
host: "localhost",
|
|
207
314
|
port: 31337,
|
|
315
|
+
tls: false,
|
|
316
|
+
auth: { type: "bearer", token: "my-token" },
|
|
208
317
|
retry: retryPolicies.default // 3 retries, exponential backoff
|
|
209
318
|
})
|
|
210
319
|
|
|
@@ -231,6 +340,8 @@ const customPolicy = new RetryPolicy({
|
|
|
231
340
|
const clientWithCustomRetry = new FlightSqlClient({
|
|
232
341
|
host: "localhost",
|
|
233
342
|
port: 31337,
|
|
343
|
+
tls: false,
|
|
344
|
+
auth: { type: "bearer", token: "my-token" },
|
|
234
345
|
retry: customPolicy
|
|
235
346
|
})
|
|
236
347
|
```
|
|
@@ -280,16 +391,15 @@ Use prepared statements for parameterized queries:
|
|
|
280
391
|
const stmt = await client.prepare("SELECT * FROM users WHERE id = ? AND status = ?")
|
|
281
392
|
|
|
282
393
|
try {
|
|
283
|
-
//
|
|
284
|
-
const
|
|
394
|
+
// Execute the query (returns a QueryResult)
|
|
395
|
+
const result = await stmt.executeQuery()
|
|
285
396
|
|
|
286
|
-
for await (const batch of stream) {
|
|
397
|
+
for await (const batch of result.stream()) {
|
|
287
398
|
console.log(`Received ${batch.numRows} rows`)
|
|
288
399
|
}
|
|
289
400
|
|
|
290
|
-
//
|
|
291
|
-
const
|
|
292
|
-
// ...
|
|
401
|
+
// Or collect all results
|
|
402
|
+
const table = await result.collect()
|
|
293
403
|
} finally {
|
|
294
404
|
// Always close prepared statements
|
|
295
405
|
await stmt.close()
|
|
@@ -304,23 +414,35 @@ The main client for interacting with Flight SQL servers.
|
|
|
304
414
|
|
|
305
415
|
#### Constructor Options
|
|
306
416
|
|
|
307
|
-
| Option
|
|
308
|
-
|
|
|
309
|
-
| `host`
|
|
310
|
-
| `port`
|
|
311
|
-
| `tls`
|
|
312
|
-
| `
|
|
313
|
-
| `
|
|
314
|
-
| `
|
|
315
|
-
| `
|
|
316
|
-
| `
|
|
417
|
+
| Option | Type | Default | Description |
|
|
418
|
+
| ------------------ | ------------------------ | ------- | ------------------------------- |
|
|
419
|
+
| `host` | `string` | — | Server hostname |
|
|
420
|
+
| `port` | `number` | — | Server port |
|
|
421
|
+
| `tls` | `boolean` | `true` | Enable TLS |
|
|
422
|
+
| `auth` | `AuthConfig` | — | Authentication configuration |
|
|
423
|
+
| `credentials` | `ChannelCredentials` | — | Custom gRPC channel credentials |
|
|
424
|
+
| `metadata` | `Record<string, string>` | — | Custom metadata headers |
|
|
425
|
+
| `connectTimeoutMs` | `number` | `30000` | Connection timeout in ms |
|
|
426
|
+
| `requestTimeoutMs` | `number` | `60000` | Request timeout in ms |
|
|
427
|
+
|
|
428
|
+
##### AuthConfig
|
|
429
|
+
|
|
430
|
+
```typescript
|
|
431
|
+
type AuthConfig =
|
|
432
|
+
| { type: "bearer"; token: string }
|
|
433
|
+
| { type: "basic"; username: string; password: string }
|
|
434
|
+
| { type: "none" }
|
|
435
|
+
```
|
|
317
436
|
|
|
318
437
|
#### Methods
|
|
319
438
|
|
|
320
439
|
##### Query Execution
|
|
321
440
|
|
|
322
|
-
- `
|
|
323
|
-
|
|
441
|
+
- `query(query: string, options?): Promise<QueryResult>` – Execute SQL, returns result with
|
|
442
|
+
`stream()` and `collect()` methods
|
|
443
|
+
- `execute(query: string, options?): Promise<FlightInfo>` – _(deprecated)_ Execute SQL, return
|
|
444
|
+
flight info
|
|
445
|
+
- `executeUpdate(query: string): Promise<bigint>` – Execute DML, return affected rows
|
|
324
446
|
- `prepare(query: string): Promise<PreparedStatement>` – Create prepared statement
|
|
325
447
|
|
|
326
448
|
##### Catalog Introspection
|
|
@@ -342,7 +464,8 @@ The main client for interacting with Flight SQL servers.
|
|
|
342
464
|
|
|
343
465
|
##### Connection Management
|
|
344
466
|
|
|
345
|
-
- `
|
|
467
|
+
- `connect(): Promise<void>` – Establish connection and authenticate
|
|
468
|
+
- `close(): void` – Close connection and release resources
|
|
346
469
|
- `isConnected(): boolean` – Check connection status
|
|
347
470
|
|
|
348
471
|
## Architecture
|
package/dist/arrow.js
CHANGED
|
@@ -118,7 +118,7 @@ function serializeSchemaMessage(schema) {
|
|
|
118
118
|
// Read the first message (schema)
|
|
119
119
|
const reader = new MessageReader(ipcBytes);
|
|
120
120
|
const msg = reader.readMessage();
|
|
121
|
-
if (msg
|
|
121
|
+
if (msg?.headerType === MessageHeader.Schema) {
|
|
122
122
|
// Return the schema portion
|
|
123
123
|
// The reader consumes: continuation(4) + length(4) + header + padding
|
|
124
124
|
const metadataLength = new DataView(ipcBytes.buffer, 4, 4).getInt32(0, true);
|
package/dist/arrow.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrow.js","sourceRoot":"","sources":["../src/arrow.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAEL,aAAa,EACb,aAAa,EAEb,iBAAiB,EACjB,uBAAuB,EAEvB,KAAK,EACL,YAAY,EACb,MAAM,cAAc,CAAA;AAErB,+EAA+E;AAC/E,iBAAiB;AACjB,+EAA+E;AAE/E;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,WAAW,CAAC,WAAuB;IACjD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAA;IACpD,CAAC;IAED,6DAA6D;IAC7D,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,WAAW,CAAC,CAAA;IAC7C,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,EAAE,CAAA;IAElC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAA;IAC5D,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,WAAuB;IACpD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAA;IACb,CAAC;IAED,IAAI,CAAC;QACH,OAAO,WAAW,CAAC,WAAW,CAAC,CAAA;IACjC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC;AAED,+EAA+E;AAC/E,yBAAyB;AACzB,+EAA+E;AAE/E;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,CAAA;AACf,CAAC;AAED,0CAA0C;AAE1C,+EAA+E;AAC/E,kBAAkB;AAClB,+EAA+E;AAE/E;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,MAAc;IAC3C,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAY,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AACxD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,KAAY;IACtC,OAAO,KAAK,CAAC,OAAO,CAAA;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,KAAY;IACzC,MAAM,MAAM,GAA8B,EAAE,CAAA;IAC5C,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;IAE7D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC;QACvC,MAAM,GAAG,GAA4B,EAAE,CAAA;QACvC,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;YAC1B,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;YAClC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAA;QAC3B,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAClB,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
|
package/dist/client.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Modeled after the official Arrow Flight SQL clients (Java, C++, Go).
|
|
6
6
|
*/
|
|
7
7
|
import { type RecordBatch, type Schema, type Table } from "apache-arrow";
|
|
8
|
-
import type
|
|
8
|
+
import { type Action, type ActionResult, type ActionType, type CatalogInfo, type ExecuteOptions, type FlightData, type FlightDescriptor, type FlightInfo, type FlightSqlClientOptions, type ForeignKeyInfo, type PrimaryKeyInfo, type SchemaInfo, type SchemaResult, type SubscribeOptions, type TableInfo, type TableType, type Ticket } from "./types";
|
|
9
9
|
/**
|
|
10
10
|
* Flight SQL client for executing queries and managing data with Arrow Flight SQL servers.
|
|
11
11
|
*
|
|
@@ -228,6 +228,10 @@ export declare class FlightSqlClient {
|
|
|
228
228
|
* Helper to fetch catalog results and map rows to typed objects
|
|
229
229
|
*/
|
|
230
230
|
private fetchCatalogResults;
|
|
231
|
+
/**
|
|
232
|
+
* Helper to extract rows from a batch and map them
|
|
233
|
+
*/
|
|
234
|
+
private extractRowsFromBatch;
|
|
231
235
|
/**
|
|
232
236
|
* Helper to fetch foreign key results with the complex schema
|
|
233
237
|
*/
|
|
@@ -270,6 +274,69 @@ export declare class FlightSqlClient {
|
|
|
270
274
|
}>): AsyncGenerator<{
|
|
271
275
|
appMetadata?: Uint8Array;
|
|
272
276
|
}, void, unknown>;
|
|
277
|
+
/**
|
|
278
|
+
* Open a bidirectional data exchange with the server.
|
|
279
|
+
*
|
|
280
|
+
* This is the low-level API for DoExchange. For real-time subscriptions,
|
|
281
|
+
* use the higher-level `subscribe()` method instead.
|
|
282
|
+
*
|
|
283
|
+
* @param descriptor - Flight descriptor for the exchange
|
|
284
|
+
* @returns An exchange handle for sending and receiving FlightData
|
|
285
|
+
*
|
|
286
|
+
* @example
|
|
287
|
+
* ```typescript
|
|
288
|
+
* const exchange = client.doExchange({
|
|
289
|
+
* type: DescriptorType.CMD,
|
|
290
|
+
* cmd: new TextEncoder().encode('SUBSCRIBE:my_topic')
|
|
291
|
+
* })
|
|
292
|
+
*
|
|
293
|
+
* // Send initial request
|
|
294
|
+
* await exchange.send({ appMetadata: subscribeCommand })
|
|
295
|
+
*
|
|
296
|
+
* // Receive responses
|
|
297
|
+
* for await (const data of exchange) {
|
|
298
|
+
* if (data.dataHeader) {
|
|
299
|
+
* // Process record batch
|
|
300
|
+
* }
|
|
301
|
+
* }
|
|
302
|
+
*
|
|
303
|
+
* // Clean up
|
|
304
|
+
* await exchange.end()
|
|
305
|
+
* ```
|
|
306
|
+
*/
|
|
307
|
+
doExchange(descriptor: FlightDescriptor): ExchangeStream;
|
|
308
|
+
/**
|
|
309
|
+
* Subscribe to real-time data updates from a query.
|
|
310
|
+
*
|
|
311
|
+
* Returns a Subscription that yields RecordBatches as they arrive from the server.
|
|
312
|
+
* Automatically handles heartbeats and can reconnect on connection loss.
|
|
313
|
+
*
|
|
314
|
+
* @param query - SQL query to subscribe to
|
|
315
|
+
* @param options - Subscription options
|
|
316
|
+
* @returns Subscription handle for receiving batches and control
|
|
317
|
+
*
|
|
318
|
+
* @example
|
|
319
|
+
* ```typescript
|
|
320
|
+
* const subscription = await client.subscribe(
|
|
321
|
+
* "SELECT * FROM events WHERE status = 'pending'",
|
|
322
|
+
* { mode: 'CHANGES_ONLY', heartbeatMs: 30000 }
|
|
323
|
+
* )
|
|
324
|
+
*
|
|
325
|
+
* for await (const batch of subscription) {
|
|
326
|
+
* console.log(`Received ${batch.numRows} rows`)
|
|
327
|
+
* }
|
|
328
|
+
*
|
|
329
|
+
* // Or with AbortController
|
|
330
|
+
* const controller = new AbortController()
|
|
331
|
+
* const subscription = await client.subscribe(query, {
|
|
332
|
+
* signal: controller.signal
|
|
333
|
+
* })
|
|
334
|
+
*
|
|
335
|
+
* // Later: cancel the subscription
|
|
336
|
+
* controller.abort()
|
|
337
|
+
* ```
|
|
338
|
+
*/
|
|
339
|
+
subscribe(query: string, options?: SubscribeOptions): Subscription;
|
|
273
340
|
/**
|
|
274
341
|
* Helper to get the first item from an async iterable without consuming the rest
|
|
275
342
|
*/
|
|
@@ -387,9 +454,9 @@ export declare class QueryResult {
|
|
|
387
454
|
*/
|
|
388
455
|
export declare class PreparedStatement {
|
|
389
456
|
private readonly client;
|
|
390
|
-
private handle;
|
|
391
|
-
private datasetSchema;
|
|
392
|
-
private parameterSchema;
|
|
457
|
+
private readonly handle;
|
|
458
|
+
private readonly datasetSchema;
|
|
459
|
+
private readonly parameterSchema;
|
|
393
460
|
private closed;
|
|
394
461
|
constructor(client: FlightSqlClient, handle: Uint8Array, datasetSchema: Schema | null, parameterSchema: Schema | null);
|
|
395
462
|
/**
|
|
@@ -413,4 +480,98 @@ export declare class PreparedStatement {
|
|
|
413
480
|
*/
|
|
414
481
|
close(): Promise<void>;
|
|
415
482
|
}
|
|
483
|
+
/**
|
|
484
|
+
* Handle for a bidirectional DoExchange stream.
|
|
485
|
+
*
|
|
486
|
+
* Allows sending and receiving FlightData messages over a single connection.
|
|
487
|
+
*/
|
|
488
|
+
export type ExchangeStream = {
|
|
489
|
+
/**
|
|
490
|
+
* Send a FlightData message to the server
|
|
491
|
+
*/
|
|
492
|
+
send: (data: FlightData) => Promise<void>;
|
|
493
|
+
/**
|
|
494
|
+
* Signal the end of client-side writes (half-close)
|
|
495
|
+
*/
|
|
496
|
+
end: () => Promise<void>;
|
|
497
|
+
/**
|
|
498
|
+
* Cancel the stream immediately
|
|
499
|
+
*/
|
|
500
|
+
cancel: () => void;
|
|
501
|
+
} & AsyncIterable<FlightData>;
|
|
502
|
+
/**
|
|
503
|
+
* Real-time subscription to query results via DoExchange.
|
|
504
|
+
*
|
|
505
|
+
* Yields RecordBatches as they arrive from the server. Handles heartbeats
|
|
506
|
+
* automatically and can reconnect on transient connection failures.
|
|
507
|
+
*
|
|
508
|
+
* @example
|
|
509
|
+
* ```typescript
|
|
510
|
+
* const subscription = client.subscribe("SELECT * FROM events")
|
|
511
|
+
*
|
|
512
|
+
* for await (const batch of subscription) {
|
|
513
|
+
* console.log(`Received ${batch.numRows} rows`)
|
|
514
|
+
* }
|
|
515
|
+
*
|
|
516
|
+
* await subscription.unsubscribe()
|
|
517
|
+
* ```
|
|
518
|
+
*/
|
|
519
|
+
export declare class Subscription implements AsyncIterable<RecordBatch> {
|
|
520
|
+
private readonly client;
|
|
521
|
+
private readonly query;
|
|
522
|
+
private readonly options;
|
|
523
|
+
private exchange;
|
|
524
|
+
private subscriptionId;
|
|
525
|
+
private connectedState;
|
|
526
|
+
private batchesReceivedCount;
|
|
527
|
+
private reconnectAttempts;
|
|
528
|
+
private abortedFlag;
|
|
529
|
+
private lastHeartbeat;
|
|
530
|
+
private iterating;
|
|
531
|
+
/** Check aborted state - method prevents ESLint from static flow analysis across async boundaries */
|
|
532
|
+
private isAborted;
|
|
533
|
+
constructor(client: FlightSqlClient, query: string, options?: SubscribeOptions);
|
|
534
|
+
/**
|
|
535
|
+
* Unique ID for this subscription (assigned by server after connect)
|
|
536
|
+
*/
|
|
537
|
+
get id(): string;
|
|
538
|
+
/**
|
|
539
|
+
* Whether the subscription is currently connected
|
|
540
|
+
*/
|
|
541
|
+
get connected(): boolean;
|
|
542
|
+
/**
|
|
543
|
+
* Number of batches received
|
|
544
|
+
*/
|
|
545
|
+
get batchesReceived(): number;
|
|
546
|
+
/**
|
|
547
|
+
* Number of reconnection attempts
|
|
548
|
+
*/
|
|
549
|
+
get reconnectCount(): number;
|
|
550
|
+
/**
|
|
551
|
+
* Timestamp of the last heartbeat received from the server
|
|
552
|
+
*/
|
|
553
|
+
get lastHeartbeatTime(): number;
|
|
554
|
+
/**
|
|
555
|
+
* Time in milliseconds since the last heartbeat
|
|
556
|
+
*/
|
|
557
|
+
get timeSinceLastHeartbeat(): number;
|
|
558
|
+
/**
|
|
559
|
+
* Start the subscription and iterate over incoming batches
|
|
560
|
+
*/
|
|
561
|
+
[Symbol.asyncIterator](): AsyncGenerator<RecordBatch, void, unknown>;
|
|
562
|
+
/**
|
|
563
|
+
* Unsubscribe and close the connection
|
|
564
|
+
*/
|
|
565
|
+
unsubscribe(): Promise<void>;
|
|
566
|
+
private streamBatches;
|
|
567
|
+
private initConnection;
|
|
568
|
+
private reconnect;
|
|
569
|
+
private cleanup;
|
|
570
|
+
private encodeSubscribeCommand;
|
|
571
|
+
private encodeMetadata;
|
|
572
|
+
private parseMetadata;
|
|
573
|
+
private parseFlightDataToBatches;
|
|
574
|
+
private frameAsIPC;
|
|
575
|
+
private sleep;
|
|
576
|
+
}
|
|
416
577
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,KAAK,WAAW,EAAqB,KAAK,MAAM,EAAE,KAAK,KAAK,EAAE,MAAM,cAAc,CAAA;AAqB3F,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,KAAK,WAAW,EAAqB,KAAK,MAAM,EAAE,KAAK,KAAK,EAAE,MAAM,cAAc,CAAA;AAqB3F,OAAO,EACL,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,UAAU,EAEf,KAAK,WAAW,EAEhB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EAEnB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,gBAAgB,EAIrB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,MAAM,EACZ,MAAM,SAAS,CAAA;AAMhB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAGA;IAExB,OAAO,CAAC,UAAU,CAA2B;IAC7C,OAAO,CAAC,aAAa,CAA6C;IAClE,OAAO,CAAC,SAAS,CAAsB;IACvC,OAAO,CAAC,SAAS,CAAQ;gBAEb,OAAO,EAAE,sBAAsB;IAc3C;;;;;OAKG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAmD9B;;OAEG;IACH,KAAK,IAA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