@qualithm/arrow-flight-sql-js 1.2.0 → 1.4.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/dist/client.d.ts CHANGED
@@ -28,6 +28,66 @@ export type UpdateResult = {
28
28
  */
29
29
  recordCount: number;
30
30
  };
31
+ /**
32
+ * Options for creating a prepared statement.
33
+ */
34
+ export type PreparedStatementOptions = CallOptions & {
35
+ /**
36
+ * Transaction ID for creating the prepared statement as part of a transaction.
37
+ * If not provided, executions of the prepared statement will be auto-committed.
38
+ */
39
+ transactionId?: Buffer;
40
+ };
41
+ /**
42
+ * Result of creating a prepared statement.
43
+ */
44
+ export type PreparedStatementResult = {
45
+ /**
46
+ * Opaque handle for the prepared statement on the server.
47
+ * Use this handle with executePreparedQuery or executePreparedUpdate.
48
+ */
49
+ handle: Buffer;
50
+ /**
51
+ * The schema of the result set, if the query returns results.
52
+ * This is an IPC-encapsulated Schema as described in Schema.fbs.
53
+ * May be empty if the query does not return results.
54
+ */
55
+ datasetSchema: Buffer;
56
+ /**
57
+ * The schema of the expected parameters, if the query has parameters.
58
+ * This is an IPC-encapsulated Schema as described in Schema.fbs.
59
+ * May be empty if the query has no parameters.
60
+ */
61
+ parameterSchema: Buffer;
62
+ };
63
+ /**
64
+ * Result of binding parameters to a prepared statement.
65
+ */
66
+ export type BindParametersResult = {
67
+ /**
68
+ * Updated handle for the prepared statement.
69
+ * If provided, this handle should be used for subsequent operations
70
+ * instead of the original handle. If undefined, continue using the
71
+ * original handle.
72
+ */
73
+ handle?: Buffer;
74
+ };
75
+ /**
76
+ * Parameter data for binding to a prepared statement.
77
+ * Can be provided as raw Arrow IPC bytes or as separate schema/data components.
78
+ */
79
+ export type ParameterData = {
80
+ /**
81
+ * Arrow IPC schema message bytes.
82
+ * Required when sending parameters.
83
+ */
84
+ schema: Uint8Array;
85
+ /**
86
+ * Arrow IPC record batch data bytes.
87
+ * Contains the actual parameter values.
88
+ */
89
+ data: Uint8Array;
90
+ };
31
91
  /**
32
92
  * Arrow Flight SQL client for executing SQL queries and commands.
33
93
  *
@@ -80,6 +140,60 @@ export declare class FlightSqlClient extends FlightClient {
80
140
  * ```
81
141
  */
82
142
  query(query: string, options?: QueryOptions): Promise<FlightInfo>;
143
+ /**
144
+ * Executes a prepared statement query and returns flight information for retrieving results.
145
+ *
146
+ * This method sends a CommandPreparedStatementQuery to the server and returns
147
+ * FlightInfo containing endpoints for data retrieval. Use the returned
148
+ * FlightInfo with `doGet()` to retrieve the actual data.
149
+ *
150
+ * @param handle - The prepared statement handle from createPreparedStatement
151
+ * @param options - Optional call options
152
+ * @returns Flight information for retrieving query results
153
+ * @throws {FlightError} If the query fails
154
+ *
155
+ * @example
156
+ * ```ts
157
+ * const prepared = await client.createPreparedStatement("SELECT * FROM users WHERE id = ?")
158
+ *
159
+ * // Execute the prepared statement
160
+ * const info = await client.executePreparedQuery(prepared.handle)
161
+ *
162
+ * // Retrieve data from each endpoint
163
+ * for (const endpoint of info.endpoint) {
164
+ * for await (const data of client.doGet(endpoint.ticket!)) {
165
+ * // Process data
166
+ * }
167
+ * }
168
+ *
169
+ * // Clean up
170
+ * await client.closePreparedStatement(prepared.handle)
171
+ * ```
172
+ */
173
+ executePreparedQuery(handle: Buffer, options?: CallOptions): Promise<FlightInfo>;
174
+ /**
175
+ * Executes a prepared statement update (INSERT, UPDATE, DELETE).
176
+ *
177
+ * @param handle - The prepared statement handle from createPreparedStatement
178
+ * @param options - Optional call options
179
+ * @returns The update result containing the number of affected records
180
+ * @throws {FlightError} If the update fails
181
+ *
182
+ * @example
183
+ * ```ts
184
+ * const prepared = await client.createPreparedStatement(
185
+ * "UPDATE users SET active = false WHERE id = ?"
186
+ * )
187
+ *
188
+ * // Execute the prepared statement
189
+ * const result = await client.executePreparedUpdate(prepared.handle)
190
+ * console.log("Rows updated:", result.recordCount)
191
+ *
192
+ * // Clean up
193
+ * await client.closePreparedStatement(prepared.handle)
194
+ * ```
195
+ */
196
+ executePreparedUpdate(handle: Buffer, options?: CallOptions): Promise<UpdateResult>;
83
197
  /**
84
198
  * Executes a SQL update statement (INSERT, UPDATE, DELETE).
85
199
  *
@@ -97,6 +211,280 @@ export declare class FlightSqlClient extends FlightClient {
97
211
  * ```
98
212
  */
99
213
  executeUpdate(query: string, options?: QueryOptions): Promise<UpdateResult>;
214
+ /**
215
+ * Creates a prepared statement for the given SQL query.
216
+ *
217
+ * The returned handle can be used to execute the query multiple times
218
+ * with different parameters. The prepared statement should be closed
219
+ * when no longer needed using `closePreparedStatement()`.
220
+ *
221
+ * @param query - The SQL query to prepare
222
+ * @param options - Optional options including transaction ID
223
+ * @returns The prepared statement result containing the handle and schemas
224
+ * @throws {FlightError} If the preparation fails
225
+ *
226
+ * @example
227
+ * ```ts
228
+ * const prepared = await client.createPreparedStatement(
229
+ * "SELECT * FROM users WHERE id = ?"
230
+ * )
231
+ *
232
+ * // Use prepared.handle with executePreparedQuery
233
+ * // ...
234
+ *
235
+ * // Clean up when done
236
+ * await client.closePreparedStatement(prepared.handle)
237
+ * ```
238
+ */
239
+ createPreparedStatement(query: string, options?: PreparedStatementOptions): Promise<PreparedStatementResult>;
240
+ /**
241
+ * Closes a prepared statement and releases server resources.
242
+ *
243
+ * @param handle - The prepared statement handle to close
244
+ * @param options - Optional call options
245
+ * @throws {FlightError} If closing fails
246
+ *
247
+ * @example
248
+ * ```ts
249
+ * const prepared = await client.createPreparedStatement("SELECT * FROM users")
250
+ * // ... use the prepared statement ...
251
+ * await client.closePreparedStatement(prepared.handle)
252
+ * ```
253
+ */
254
+ closePreparedStatement(handle: Buffer, options?: CallOptions): Promise<void>;
255
+ /**
256
+ * Binds parameter values to a prepared statement.
257
+ *
258
+ * Parameter values are sent as Arrow IPC data matching the parameter schema
259
+ * from the prepared statement. After binding, call `executePreparedQuery()`
260
+ * or `executePreparedUpdate()` to execute with the bound parameters.
261
+ *
262
+ * @param handle - The prepared statement handle
263
+ * @param parameters - The parameter data as Arrow IPC bytes
264
+ * @param options - Optional call options
265
+ * @returns Result containing an optional updated handle
266
+ * @throws {FlightError} If binding fails
267
+ *
268
+ * @example
269
+ * ```ts
270
+ * import { tableToIPC, tableFromArrays } from "apache-arrow"
271
+ *
272
+ * const prepared = await client.createPreparedStatement(
273
+ * "SELECT * FROM users WHERE id = ?"
274
+ * )
275
+ *
276
+ * // Create parameter data as Arrow IPC
277
+ * const params = tableFromArrays({ id: [42] })
278
+ * const ipcData = tableToIPC(params)
279
+ *
280
+ * // Bind the parameters
281
+ * const result = await client.bindParameters(prepared.handle, {
282
+ * schema: ipcData.slice(0, schemaLength), // Extract schema bytes
283
+ * data: ipcData.slice(schemaLength) // Extract data bytes
284
+ * })
285
+ *
286
+ * // Use updated handle if provided
287
+ * const handle = result.handle ?? prepared.handle
288
+ *
289
+ * // Execute and retrieve results
290
+ * const info = await client.executePreparedQuery(handle)
291
+ * ```
292
+ */
293
+ bindParameters(handle: Buffer, parameters: ParameterData, options?: CallOptions): Promise<BindParametersResult>;
294
+ /**
295
+ * Retrieves the list of catalogs (databases) available on the server.
296
+ *
297
+ * @param options - Optional call options
298
+ * @returns Flight information for retrieving catalog data
299
+ * @throws {FlightError} If the request fails
300
+ *
301
+ * @example
302
+ * ```ts
303
+ * const info = await client.getCatalogs()
304
+ * const table = await flightInfoToTable(client, info)
305
+ * for (const row of table) {
306
+ * console.log("Catalog:", row.catalog_name)
307
+ * }
308
+ * ```
309
+ */
310
+ getCatalogs(options?: CallOptions): Promise<FlightInfo>;
311
+ /**
312
+ * Retrieves the list of database schemas.
313
+ *
314
+ * @param options - Optional filtering and call options
315
+ * @returns Flight information for retrieving schema data
316
+ * @throws {FlightError} If the request fails
317
+ *
318
+ * @example
319
+ * ```ts
320
+ * // Get all schemas
321
+ * const info = await client.getDbSchemas()
322
+ *
323
+ * // Get schemas in a specific catalog
324
+ * const info = await client.getDbSchemas({ catalog: "my_database" })
325
+ *
326
+ * // Get schemas matching a pattern
327
+ * const info = await client.getDbSchemas({ dbSchemaFilterPattern: "public%" })
328
+ * ```
329
+ */
330
+ getDbSchemas(options?: CallOptions & {
331
+ catalog?: string;
332
+ dbSchemaFilterPattern?: string;
333
+ }): Promise<FlightInfo>;
334
+ /**
335
+ * Retrieves the list of tables.
336
+ *
337
+ * @param options - Optional filtering and call options
338
+ * @returns Flight information for retrieving table data
339
+ * @throws {FlightError} If the request fails
340
+ *
341
+ * @example
342
+ * ```ts
343
+ * // Get all tables
344
+ * const info = await client.getTables()
345
+ *
346
+ * // Get tables with schema information
347
+ * const info = await client.getTables({ includeSchema: true })
348
+ *
349
+ * // Get only views
350
+ * const info = await client.getTables({ tableTypes: ["VIEW"] })
351
+ *
352
+ * // Get tables matching a pattern in a specific schema
353
+ * const info = await client.getTables({
354
+ * dbSchemaFilterPattern: "public",
355
+ * tableNameFilterPattern: "user%"
356
+ * })
357
+ * ```
358
+ */
359
+ getTables(options?: CallOptions & {
360
+ catalog?: string;
361
+ dbSchemaFilterPattern?: string;
362
+ tableNameFilterPattern?: string;
363
+ tableTypes?: string[];
364
+ includeSchema?: boolean;
365
+ }): Promise<FlightInfo>;
366
+ /**
367
+ * Retrieves the list of table types supported by the server.
368
+ *
369
+ * Common table types include TABLE, VIEW, and SYSTEM TABLE.
370
+ *
371
+ * @param options - Optional call options
372
+ * @returns Flight information for retrieving table type data
373
+ * @throws {FlightError} If the request fails
374
+ *
375
+ * @example
376
+ * ```ts
377
+ * const info = await client.getTableTypes()
378
+ * const table = await flightInfoToTable(client, info)
379
+ * for (const row of table) {
380
+ * console.log("Table type:", row.table_type)
381
+ * }
382
+ * ```
383
+ */
384
+ getTableTypes(options?: CallOptions): Promise<FlightInfo>;
385
+ /**
386
+ * Retrieves the primary keys for a table.
387
+ *
388
+ * @param table - The table name to get primary keys for
389
+ * @param options - Optional filtering and call options
390
+ * @returns Flight information for retrieving primary key data
391
+ * @throws {FlightError} If the request fails
392
+ *
393
+ * @example
394
+ * ```ts
395
+ * const info = await client.getPrimaryKeys("users", {
396
+ * catalog: "my_database",
397
+ * dbSchema: "public"
398
+ * })
399
+ * const table = await flightInfoToTable(client, info)
400
+ * for (const row of table) {
401
+ * console.log("Primary key column:", row.column_name)
402
+ * }
403
+ * ```
404
+ */
405
+ getPrimaryKeys(table: string, options?: CallOptions & {
406
+ catalog?: string;
407
+ dbSchema?: string;
408
+ }): Promise<FlightInfo>;
409
+ /**
410
+ * Retrieves the exported keys (foreign keys that reference this table's primary key).
411
+ *
412
+ * @param table - The table name to get exported keys for
413
+ * @param options - Optional filtering and call options
414
+ * @returns Flight information for retrieving exported key data
415
+ * @throws {FlightError} If the request fails
416
+ *
417
+ * @example
418
+ * ```ts
419
+ * const info = await client.getExportedKeys("users")
420
+ * const table = await flightInfoToTable(client, info)
421
+ * for (const row of table) {
422
+ * console.log(`${row.fk_table_name}.${row.fk_column_name} -> ${row.pk_column_name}`)
423
+ * }
424
+ * ```
425
+ */
426
+ getExportedKeys(table: string, options?: CallOptions & {
427
+ catalog?: string;
428
+ dbSchema?: string;
429
+ }): Promise<FlightInfo>;
430
+ /**
431
+ * Retrieves the imported keys (foreign keys in this table that reference other tables).
432
+ *
433
+ * @param table - The table name to get imported keys for
434
+ * @param options - Optional filtering and call options
435
+ * @returns Flight information for retrieving imported key data
436
+ * @throws {FlightError} If the request fails
437
+ *
438
+ * @example
439
+ * ```ts
440
+ * const info = await client.getImportedKeys("orders")
441
+ * const table = await flightInfoToTable(client, info)
442
+ * for (const row of table) {
443
+ * console.log(`${row.fk_column_name} -> ${row.pk_table_name}.${row.pk_column_name}`)
444
+ * }
445
+ * ```
446
+ */
447
+ getImportedKeys(table: string, options?: CallOptions & {
448
+ catalog?: string;
449
+ dbSchema?: string;
450
+ }): Promise<FlightInfo>;
451
+ /**
452
+ * Retrieves SQL information about the server's capabilities.
453
+ *
454
+ * @param info - Array of SqlInfo codes to retrieve; if empty, returns all
455
+ * @param options - Optional call options
456
+ * @returns Flight information for retrieving SQL info data
457
+ * @throws {FlightError} If the request fails
458
+ *
459
+ * @example
460
+ * ```ts
461
+ * // Get all SQL info
462
+ * const info = await client.getSqlInfo()
463
+ *
464
+ * // Get specific info (use SqlInfo enum values)
465
+ * const info = await client.getSqlInfo([0, 1, 2]) // server name, version, arrow version
466
+ * ```
467
+ */
468
+ getSqlInfo(info?: number[], options?: CallOptions): Promise<FlightInfo>;
469
+ /**
470
+ * Retrieves information about data types supported by the server.
471
+ *
472
+ * @param options - Optional data type filter and call options
473
+ * @returns Flight information for retrieving type info data
474
+ * @throws {FlightError} If the request fails
475
+ *
476
+ * @example
477
+ * ```ts
478
+ * // Get all type info
479
+ * const info = await client.getXdbcTypeInfo()
480
+ *
481
+ * // Get info for a specific data type
482
+ * const info = await client.getXdbcTypeInfo({ dataType: 12 }) // VARCHAR
483
+ * ```
484
+ */
485
+ getXdbcTypeInfo(options?: CallOptions & {
486
+ dataType?: number;
487
+ }): Promise<FlightInfo>;
100
488
  }
101
489
  /**
102
490
  * Creates a new FlightSqlClient and connects to the server.
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,KAAK,WAAW,EAGhB,YAAY,EACZ,KAAK,mBAAmB,EAExB,KAAK,UAAU,EAChB,MAAM,2BAA2B,CAAA;AAalC;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,mBAAmB,CAAA;AAExD;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG;IACvC;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAiFD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,eAAgB,SAAQ,YAAY;IAC/C;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACG,KAAK,CAAC,KAAK,EAAE,MAAM,EA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,MAAM,CAAA;KAClB,GACA,OAAO,CAAC,UAAU,CAAC;IAWtB;;;;;;;;;;;;;;;;OAgBG;IACG,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;IAS7E;;;;;;;;;;;;;;;OAeG;IACG,eAAe,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,CAAC;CAQ1F;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,eAAe,CAAC,CAI1B"}
package/dist/client.js CHANGED
@@ -4,11 +4,16 @@
4
4
  * @packageDocumentation
5
5
  */
6
6
  import { cmdDescriptor, FlightClient, FlightError } from "@qualithm/arrow-flight-js";
7
- import { CommandStatementQuery, CommandStatementUpdate, DoPutUpdateResult } from "./generated/arrow/flight/protocol/sql/FlightSql.js";
7
+ import { ActionClosePreparedStatementRequest, ActionCreatePreparedStatementRequest, ActionCreatePreparedStatementResult, CommandGetCatalogs, CommandGetDbSchemas, CommandGetExportedKeys, CommandGetImportedKeys, CommandGetPrimaryKeys, CommandGetSqlInfo, CommandGetTables, CommandGetTableTypes, CommandGetXdbcTypeInfo, CommandPreparedStatementQuery, CommandPreparedStatementUpdate, CommandStatementQuery, CommandStatementUpdate, DoPutPreparedStatementResult, DoPutUpdateResult } from "./generated/arrow/flight/protocol/sql/FlightSql.js";
8
8
  /**
9
9
  * Flight SQL type URL prefix for encoding commands in Any messages.
10
10
  */
11
11
  const TYPE_URL_PREFIX = "type.googleapis.com/arrow.flight.protocol.sql";
12
+ /**
13
+ * Flight SQL action types.
14
+ */
15
+ const ACTION_CREATE_PREPARED_STATEMENT = "CreatePreparedStatement";
16
+ const ACTION_CLOSE_PREPARED_STATEMENT = "ClosePreparedStatement";
12
17
  /**
13
18
  * Encodes a Flight SQL command as a descriptor command buffer.
14
19
  *
@@ -66,6 +71,54 @@ function writeVarInt(buffer, offset, value) {
66
71
  buffer[offset++] = value;
67
72
  return offset;
68
73
  }
74
+ /**
75
+ * Reads a varint from a buffer.
76
+ */
77
+ function readVarInt(buffer, offset) {
78
+ let value = 0;
79
+ let shift = 0;
80
+ let bytesRead = 0;
81
+ while (offset < buffer.length) {
82
+ const byte = buffer[offset++];
83
+ bytesRead++;
84
+ value |= (byte & 0x7f) << shift;
85
+ if ((byte & 0x80) === 0) {
86
+ break;
87
+ }
88
+ shift += 7;
89
+ }
90
+ return { value, bytesRead };
91
+ }
92
+ /**
93
+ * Unpacks a protobuf Any message and returns the contained value bytes.
94
+ *
95
+ * @param buffer - The encoded Any message
96
+ * @returns The value bytes from the Any message
97
+ */
98
+ function unpackAny(buffer) {
99
+ // Any message format:
100
+ // field 1 (type_url): string - wire type 2 (length-delimited)
101
+ // field 2 (value): bytes - wire type 2 (length-delimited)
102
+ let offset = 0;
103
+ let valueBytes = Buffer.alloc(0);
104
+ while (offset < buffer.length) {
105
+ const tag = buffer[offset++];
106
+ const fieldNumber = tag >> 3;
107
+ const wireType = tag & 0x07;
108
+ if (wireType !== 2) {
109
+ // Skip non-length-delimited fields (not expected in Any)
110
+ continue;
111
+ }
112
+ const { value: length, bytesRead } = readVarInt(buffer, offset);
113
+ offset += bytesRead;
114
+ if (fieldNumber === 2) {
115
+ // This is the value field
116
+ valueBytes = buffer.subarray(offset, offset + length);
117
+ }
118
+ offset += length;
119
+ }
120
+ return valueBytes;
121
+ }
69
122
  /**
70
123
  * Creates a command descriptor for a Flight SQL command.
71
124
  *
@@ -138,6 +191,101 @@ export class FlightSqlClient extends FlightClient {
138
191
  const descriptor = createCommandDescriptor("CommandStatementQuery", encoded);
139
192
  return this.getFlightInfo(descriptor, options);
140
193
  }
194
+ /**
195
+ * Executes a prepared statement query and returns flight information for retrieving results.
196
+ *
197
+ * This method sends a CommandPreparedStatementQuery to the server and returns
198
+ * FlightInfo containing endpoints for data retrieval. Use the returned
199
+ * FlightInfo with `doGet()` to retrieve the actual data.
200
+ *
201
+ * @param handle - The prepared statement handle from createPreparedStatement
202
+ * @param options - Optional call options
203
+ * @returns Flight information for retrieving query results
204
+ * @throws {FlightError} If the query fails
205
+ *
206
+ * @example
207
+ * ```ts
208
+ * const prepared = await client.createPreparedStatement("SELECT * FROM users WHERE id = ?")
209
+ *
210
+ * // Execute the prepared statement
211
+ * const info = await client.executePreparedQuery(prepared.handle)
212
+ *
213
+ * // Retrieve data from each endpoint
214
+ * for (const endpoint of info.endpoint) {
215
+ * for await (const data of client.doGet(endpoint.ticket!)) {
216
+ * // Process data
217
+ * }
218
+ * }
219
+ *
220
+ * // Clean up
221
+ * await client.closePreparedStatement(prepared.handle)
222
+ * ```
223
+ */
224
+ async executePreparedQuery(handle, options) {
225
+ const command = {
226
+ preparedStatementHandle: handle
227
+ };
228
+ const encoded = CommandPreparedStatementQuery.encode(command).finish();
229
+ const descriptor = createCommandDescriptor("CommandPreparedStatementQuery", encoded);
230
+ return this.getFlightInfo(descriptor, options);
231
+ }
232
+ /**
233
+ * Executes a prepared statement update (INSERT, UPDATE, DELETE).
234
+ *
235
+ * @param handle - The prepared statement handle from createPreparedStatement
236
+ * @param options - Optional call options
237
+ * @returns The update result containing the number of affected records
238
+ * @throws {FlightError} If the update fails
239
+ *
240
+ * @example
241
+ * ```ts
242
+ * const prepared = await client.createPreparedStatement(
243
+ * "UPDATE users SET active = false WHERE id = ?"
244
+ * )
245
+ *
246
+ * // Execute the prepared statement
247
+ * const result = await client.executePreparedUpdate(prepared.handle)
248
+ * console.log("Rows updated:", result.recordCount)
249
+ *
250
+ * // Clean up
251
+ * await client.closePreparedStatement(prepared.handle)
252
+ * ```
253
+ */
254
+ async executePreparedUpdate(handle, options) {
255
+ const command = {
256
+ preparedStatementHandle: handle
257
+ };
258
+ const encoded = CommandPreparedStatementUpdate.encode(command).finish();
259
+ const descriptor = createCommandDescriptor("CommandPreparedStatementUpdate", encoded);
260
+ const stream = this.doPut(options);
261
+ // Send the command as the first message with descriptor
262
+ stream.write({
263
+ flightDescriptor: {
264
+ type: 2, // CMD
265
+ path: [],
266
+ cmd: descriptor.cmd
267
+ },
268
+ dataHeader: Buffer.alloc(0),
269
+ appMetadata: Buffer.alloc(0),
270
+ dataBody: Buffer.alloc(0)
271
+ });
272
+ stream.end();
273
+ // Collect results
274
+ const results = await stream.collectResults();
275
+ const firstResult = results.at(0);
276
+ if (!firstResult) {
277
+ throw new FlightError("no result returned from prepared update", "INTERNAL");
278
+ }
279
+ // Decode the DoPutUpdateResult from appMetadata
280
+ const { appMetadata } = firstResult;
281
+ if (appMetadata.length === 0) {
282
+ throw new FlightError("prepared update result missing app metadata", "INTERNAL");
283
+ }
284
+ const updateResult = DoPutUpdateResult.decode(appMetadata);
285
+ return {
286
+ recordCount: updateResult.recordCount
287
+ };
288
+ }
141
289
  /**
142
290
  * Executes a SQL update statement (INSERT, UPDATE, DELETE).
143
291
  *
@@ -190,6 +338,414 @@ export class FlightSqlClient extends FlightClient {
190
338
  recordCount: updateResult.recordCount
191
339
  };
192
340
  }
341
+ /**
342
+ * Creates a prepared statement for the given SQL query.
343
+ *
344
+ * The returned handle can be used to execute the query multiple times
345
+ * with different parameters. The prepared statement should be closed
346
+ * when no longer needed using `closePreparedStatement()`.
347
+ *
348
+ * @param query - The SQL query to prepare
349
+ * @param options - Optional options including transaction ID
350
+ * @returns The prepared statement result containing the handle and schemas
351
+ * @throws {FlightError} If the preparation fails
352
+ *
353
+ * @example
354
+ * ```ts
355
+ * const prepared = await client.createPreparedStatement(
356
+ * "SELECT * FROM users WHERE id = ?"
357
+ * )
358
+ *
359
+ * // Use prepared.handle with executePreparedQuery
360
+ * // ...
361
+ *
362
+ * // Clean up when done
363
+ * await client.closePreparedStatement(prepared.handle)
364
+ * ```
365
+ */
366
+ async createPreparedStatement(query, options) {
367
+ const request = {
368
+ query,
369
+ transactionId: options?.transactionId
370
+ };
371
+ const encoded = ActionCreatePreparedStatementRequest.encode(request).finish();
372
+ const typeUrl = `${TYPE_URL_PREFIX}.ActionCreatePreparedStatementRequest`;
373
+ const body = packAny(typeUrl, encoded);
374
+ const action = {
375
+ type: ACTION_CREATE_PREPARED_STATEMENT,
376
+ body
377
+ };
378
+ // Execute the action and collect the first result
379
+ let resultBody;
380
+ for await (const result of this.doAction(action, options)) {
381
+ resultBody = result.body;
382
+ break;
383
+ }
384
+ if (!resultBody || resultBody.length === 0) {
385
+ throw new FlightError("no result returned from create prepared statement", "INTERNAL");
386
+ }
387
+ // Unpack the Any message and decode the result
388
+ const valueBytes = unpackAny(resultBody);
389
+ const preparedResult = ActionCreatePreparedStatementResult.decode(valueBytes);
390
+ return {
391
+ handle: Buffer.from(preparedResult.preparedStatementHandle),
392
+ datasetSchema: Buffer.from(preparedResult.datasetSchema),
393
+ parameterSchema: Buffer.from(preparedResult.parameterSchema)
394
+ };
395
+ }
396
+ /**
397
+ * Closes a prepared statement and releases server resources.
398
+ *
399
+ * @param handle - The prepared statement handle to close
400
+ * @param options - Optional call options
401
+ * @throws {FlightError} If closing fails
402
+ *
403
+ * @example
404
+ * ```ts
405
+ * const prepared = await client.createPreparedStatement("SELECT * FROM users")
406
+ * // ... use the prepared statement ...
407
+ * await client.closePreparedStatement(prepared.handle)
408
+ * ```
409
+ */
410
+ async closePreparedStatement(handle, options) {
411
+ const request = {
412
+ preparedStatementHandle: handle
413
+ };
414
+ const encoded = ActionClosePreparedStatementRequest.encode(request).finish();
415
+ const typeUrl = `${TYPE_URL_PREFIX}.ActionClosePreparedStatementRequest`;
416
+ const body = packAny(typeUrl, encoded);
417
+ const action = {
418
+ type: ACTION_CLOSE_PREPARED_STATEMENT,
419
+ body
420
+ };
421
+ // Execute the action - no result expected
422
+ for await (const _ of this.doAction(action, options)) {
423
+ // Consume any results (usually none for close)
424
+ }
425
+ }
426
+ /**
427
+ * Binds parameter values to a prepared statement.
428
+ *
429
+ * Parameter values are sent as Arrow IPC data matching the parameter schema
430
+ * from the prepared statement. After binding, call `executePreparedQuery()`
431
+ * or `executePreparedUpdate()` to execute with the bound parameters.
432
+ *
433
+ * @param handle - The prepared statement handle
434
+ * @param parameters - The parameter data as Arrow IPC bytes
435
+ * @param options - Optional call options
436
+ * @returns Result containing an optional updated handle
437
+ * @throws {FlightError} If binding fails
438
+ *
439
+ * @example
440
+ * ```ts
441
+ * import { tableToIPC, tableFromArrays } from "apache-arrow"
442
+ *
443
+ * const prepared = await client.createPreparedStatement(
444
+ * "SELECT * FROM users WHERE id = ?"
445
+ * )
446
+ *
447
+ * // Create parameter data as Arrow IPC
448
+ * const params = tableFromArrays({ id: [42] })
449
+ * const ipcData = tableToIPC(params)
450
+ *
451
+ * // Bind the parameters
452
+ * const result = await client.bindParameters(prepared.handle, {
453
+ * schema: ipcData.slice(0, schemaLength), // Extract schema bytes
454
+ * data: ipcData.slice(schemaLength) // Extract data bytes
455
+ * })
456
+ *
457
+ * // Use updated handle if provided
458
+ * const handle = result.handle ?? prepared.handle
459
+ *
460
+ * // Execute and retrieve results
461
+ * const info = await client.executePreparedQuery(handle)
462
+ * ```
463
+ */
464
+ async bindParameters(handle, parameters, options) {
465
+ const command = {
466
+ preparedStatementHandle: handle
467
+ };
468
+ const encoded = CommandPreparedStatementQuery.encode(command).finish();
469
+ const descriptor = createCommandDescriptor("CommandPreparedStatementQuery", encoded);
470
+ const stream = this.doPut(options);
471
+ // Send the command with schema in the first message
472
+ stream.write({
473
+ flightDescriptor: {
474
+ type: 2, // CMD
475
+ path: [],
476
+ cmd: descriptor.cmd
477
+ },
478
+ dataHeader: Buffer.from(parameters.schema),
479
+ appMetadata: Buffer.alloc(0),
480
+ dataBody: Buffer.from(parameters.data)
481
+ });
482
+ stream.end();
483
+ // Collect results
484
+ const results = await stream.collectResults();
485
+ const firstResult = results.at(0);
486
+ // Server may not return any result (legacy behavior)
487
+ if (!firstResult || firstResult.appMetadata.length === 0) {
488
+ return {};
489
+ }
490
+ // Decode the DoPutPreparedStatementResult from appMetadata
491
+ const anyBytes = unpackAny(firstResult.appMetadata);
492
+ if (anyBytes.length === 0) {
493
+ return {};
494
+ }
495
+ const bindResult = DoPutPreparedStatementResult.decode(anyBytes);
496
+ return {
497
+ handle: bindResult.preparedStatementHandle
498
+ ? Buffer.from(bindResult.preparedStatementHandle)
499
+ : undefined
500
+ };
501
+ }
502
+ // ─────────────────────────────────────────────────────────────────────────────
503
+ // Metadata Queries
504
+ // ─────────────────────────────────────────────────────────────────────────────
505
+ /**
506
+ * Retrieves the list of catalogs (databases) available on the server.
507
+ *
508
+ * @param options - Optional call options
509
+ * @returns Flight information for retrieving catalog data
510
+ * @throws {FlightError} If the request fails
511
+ *
512
+ * @example
513
+ * ```ts
514
+ * const info = await client.getCatalogs()
515
+ * const table = await flightInfoToTable(client, info)
516
+ * for (const row of table) {
517
+ * console.log("Catalog:", row.catalog_name)
518
+ * }
519
+ * ```
520
+ */
521
+ async getCatalogs(options) {
522
+ const command = {};
523
+ const encoded = CommandGetCatalogs.encode(command).finish();
524
+ const descriptor = createCommandDescriptor("CommandGetCatalogs", encoded);
525
+ return this.getFlightInfo(descriptor, options);
526
+ }
527
+ /**
528
+ * Retrieves the list of database schemas.
529
+ *
530
+ * @param options - Optional filtering and call options
531
+ * @returns Flight information for retrieving schema data
532
+ * @throws {FlightError} If the request fails
533
+ *
534
+ * @example
535
+ * ```ts
536
+ * // Get all schemas
537
+ * const info = await client.getDbSchemas()
538
+ *
539
+ * // Get schemas in a specific catalog
540
+ * const info = await client.getDbSchemas({ catalog: "my_database" })
541
+ *
542
+ * // Get schemas matching a pattern
543
+ * const info = await client.getDbSchemas({ dbSchemaFilterPattern: "public%" })
544
+ * ```
545
+ */
546
+ async getDbSchemas(options) {
547
+ const command = {
548
+ catalog: options?.catalog,
549
+ dbSchemaFilterPattern: options?.dbSchemaFilterPattern
550
+ };
551
+ const encoded = CommandGetDbSchemas.encode(command).finish();
552
+ const descriptor = createCommandDescriptor("CommandGetDbSchemas", encoded);
553
+ return this.getFlightInfo(descriptor, options);
554
+ }
555
+ /**
556
+ * Retrieves the list of tables.
557
+ *
558
+ * @param options - Optional filtering and call options
559
+ * @returns Flight information for retrieving table data
560
+ * @throws {FlightError} If the request fails
561
+ *
562
+ * @example
563
+ * ```ts
564
+ * // Get all tables
565
+ * const info = await client.getTables()
566
+ *
567
+ * // Get tables with schema information
568
+ * const info = await client.getTables({ includeSchema: true })
569
+ *
570
+ * // Get only views
571
+ * const info = await client.getTables({ tableTypes: ["VIEW"] })
572
+ *
573
+ * // Get tables matching a pattern in a specific schema
574
+ * const info = await client.getTables({
575
+ * dbSchemaFilterPattern: "public",
576
+ * tableNameFilterPattern: "user%"
577
+ * })
578
+ * ```
579
+ */
580
+ async getTables(options) {
581
+ const command = {
582
+ catalog: options?.catalog,
583
+ dbSchemaFilterPattern: options?.dbSchemaFilterPattern,
584
+ tableNameFilterPattern: options?.tableNameFilterPattern,
585
+ tableTypes: options?.tableTypes ?? [],
586
+ includeSchema: options?.includeSchema ?? false
587
+ };
588
+ const encoded = CommandGetTables.encode(command).finish();
589
+ const descriptor = createCommandDescriptor("CommandGetTables", encoded);
590
+ return this.getFlightInfo(descriptor, options);
591
+ }
592
+ /**
593
+ * Retrieves the list of table types supported by the server.
594
+ *
595
+ * Common table types include TABLE, VIEW, and SYSTEM TABLE.
596
+ *
597
+ * @param options - Optional call options
598
+ * @returns Flight information for retrieving table type data
599
+ * @throws {FlightError} If the request fails
600
+ *
601
+ * @example
602
+ * ```ts
603
+ * const info = await client.getTableTypes()
604
+ * const table = await flightInfoToTable(client, info)
605
+ * for (const row of table) {
606
+ * console.log("Table type:", row.table_type)
607
+ * }
608
+ * ```
609
+ */
610
+ async getTableTypes(options) {
611
+ const command = {};
612
+ const encoded = CommandGetTableTypes.encode(command).finish();
613
+ const descriptor = createCommandDescriptor("CommandGetTableTypes", encoded);
614
+ return this.getFlightInfo(descriptor, options);
615
+ }
616
+ /**
617
+ * Retrieves the primary keys for a table.
618
+ *
619
+ * @param table - The table name to get primary keys for
620
+ * @param options - Optional filtering and call options
621
+ * @returns Flight information for retrieving primary key data
622
+ * @throws {FlightError} If the request fails
623
+ *
624
+ * @example
625
+ * ```ts
626
+ * const info = await client.getPrimaryKeys("users", {
627
+ * catalog: "my_database",
628
+ * dbSchema: "public"
629
+ * })
630
+ * const table = await flightInfoToTable(client, info)
631
+ * for (const row of table) {
632
+ * console.log("Primary key column:", row.column_name)
633
+ * }
634
+ * ```
635
+ */
636
+ async getPrimaryKeys(table, options) {
637
+ const command = {
638
+ table,
639
+ catalog: options?.catalog,
640
+ dbSchema: options?.dbSchema
641
+ };
642
+ const encoded = CommandGetPrimaryKeys.encode(command).finish();
643
+ const descriptor = createCommandDescriptor("CommandGetPrimaryKeys", encoded);
644
+ return this.getFlightInfo(descriptor, options);
645
+ }
646
+ /**
647
+ * Retrieves the exported keys (foreign keys that reference this table's primary key).
648
+ *
649
+ * @param table - The table name to get exported keys for
650
+ * @param options - Optional filtering and call options
651
+ * @returns Flight information for retrieving exported key data
652
+ * @throws {FlightError} If the request fails
653
+ *
654
+ * @example
655
+ * ```ts
656
+ * const info = await client.getExportedKeys("users")
657
+ * const table = await flightInfoToTable(client, info)
658
+ * for (const row of table) {
659
+ * console.log(`${row.fk_table_name}.${row.fk_column_name} -> ${row.pk_column_name}`)
660
+ * }
661
+ * ```
662
+ */
663
+ async getExportedKeys(table, options) {
664
+ const command = {
665
+ table,
666
+ catalog: options?.catalog,
667
+ dbSchema: options?.dbSchema
668
+ };
669
+ const encoded = CommandGetExportedKeys.encode(command).finish();
670
+ const descriptor = createCommandDescriptor("CommandGetExportedKeys", encoded);
671
+ return this.getFlightInfo(descriptor, options);
672
+ }
673
+ /**
674
+ * Retrieves the imported keys (foreign keys in this table that reference other tables).
675
+ *
676
+ * @param table - The table name to get imported keys for
677
+ * @param options - Optional filtering and call options
678
+ * @returns Flight information for retrieving imported key data
679
+ * @throws {FlightError} If the request fails
680
+ *
681
+ * @example
682
+ * ```ts
683
+ * const info = await client.getImportedKeys("orders")
684
+ * const table = await flightInfoToTable(client, info)
685
+ * for (const row of table) {
686
+ * console.log(`${row.fk_column_name} -> ${row.pk_table_name}.${row.pk_column_name}`)
687
+ * }
688
+ * ```
689
+ */
690
+ async getImportedKeys(table, options) {
691
+ const command = {
692
+ table,
693
+ catalog: options?.catalog,
694
+ dbSchema: options?.dbSchema
695
+ };
696
+ const encoded = CommandGetImportedKeys.encode(command).finish();
697
+ const descriptor = createCommandDescriptor("CommandGetImportedKeys", encoded);
698
+ return this.getFlightInfo(descriptor, options);
699
+ }
700
+ /**
701
+ * Retrieves SQL information about the server's capabilities.
702
+ *
703
+ * @param info - Array of SqlInfo codes to retrieve; if empty, returns all
704
+ * @param options - Optional call options
705
+ * @returns Flight information for retrieving SQL info data
706
+ * @throws {FlightError} If the request fails
707
+ *
708
+ * @example
709
+ * ```ts
710
+ * // Get all SQL info
711
+ * const info = await client.getSqlInfo()
712
+ *
713
+ * // Get specific info (use SqlInfo enum values)
714
+ * const info = await client.getSqlInfo([0, 1, 2]) // server name, version, arrow version
715
+ * ```
716
+ */
717
+ async getSqlInfo(info, options) {
718
+ const command = {
719
+ info: info ?? []
720
+ };
721
+ const encoded = CommandGetSqlInfo.encode(command).finish();
722
+ const descriptor = createCommandDescriptor("CommandGetSqlInfo", encoded);
723
+ return this.getFlightInfo(descriptor, options);
724
+ }
725
+ /**
726
+ * Retrieves information about data types supported by the server.
727
+ *
728
+ * @param options - Optional data type filter and call options
729
+ * @returns Flight information for retrieving type info data
730
+ * @throws {FlightError} If the request fails
731
+ *
732
+ * @example
733
+ * ```ts
734
+ * // Get all type info
735
+ * const info = await client.getXdbcTypeInfo()
736
+ *
737
+ * // Get info for a specific data type
738
+ * const info = await client.getXdbcTypeInfo({ dataType: 12 }) // VARCHAR
739
+ * ```
740
+ */
741
+ async getXdbcTypeInfo(options) {
742
+ const command = {
743
+ dataType: options?.dataType
744
+ };
745
+ const encoded = CommandGetXdbcTypeInfo.encode(command).finish();
746
+ const descriptor = createCommandDescriptor("CommandGetXdbcTypeInfo", encoded);
747
+ return this.getFlightInfo(descriptor, options);
748
+ }
193
749
  }
194
750
  /**
195
751
  * Creates a new FlightSqlClient and connects to the server.
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAGL,aAAa,EACb,YAAY,EAEZ,WAAW,EAEZ,MAAM,2BAA2B,CAAA;AAElC,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,oDAAoD,CAAA;AAE3D;;GAEG;AACH,MAAM,eAAe,GAAG,+CAA+C,CAAA;AA6BvE;;;;;;;;;GASG;AACH,SAAS,OAAO,CAAC,OAAe,EAAE,IAAgB;IAChD,sBAAsB;IACtB,8DAA8D;IAC9D,0DAA0D;IAC1D,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;IACjD,MAAM,UAAU,GAAG,YAAY,CAAC,MAAM,CAAA;IACtC,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAA;IAE3B,yBAAyB;IACzB,MAAM,iBAAiB,GAAG,UAAU,CAAC,UAAU,CAAC,CAAA;IAChD,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;IAE1C,mEAAmE;IACnE,MAAM,SAAS,GAAG,CAAC,GAAG,iBAAiB,GAAG,UAAU,GAAG,CAAC,GAAG,cAAc,GAAG,OAAO,CAAA;IACnF,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;IAEtC,IAAI,MAAM,GAAG,CAAC,CAAA;IAEd,wDAAwD;IACxD,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,CAAA;IACvB,MAAM,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAA;IAChD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,CAAA;QAC1D,MAAM,UAAU,GAAG,uBAAuB,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAA;QACxE,OAAO,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA;IAChD,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,eAAe,CAAC,OAA6C;QACjE,MAAM,OAAO,GAA2B;YACtC,QAAQ,EAAE,OAAO,EAAE,QAAQ;SAC5B,CAAA;QACD,MAAM,OAAO,GAAG,sBAAsB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAA;QAC/D,MAAM,UAAU,GAAG,uBAAuB,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAA;QAC7E,OAAO,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA;IAChD,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,OAA+B;IAE/B,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,OAAO,CAAC,CAAA;IAC3C,MAAM,MAAM,CAAC,OAAO,EAAE,CAAA;IACtB,OAAO,MAAM,CAAA;AACf,CAAC"}
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * @packageDocumentation
8
8
  */
9
- export type { FlightSqlClientOptions, QueryOptions, UpdateResult } from "./client.js";
9
+ export type { BindParametersResult, FlightSqlClientOptions, ParameterData, PreparedStatementOptions, PreparedStatementResult, QueryOptions, UpdateResult } from "./client.js";
10
10
  export { createFlightSqlClient, FlightSqlClient } from "./client.js";
11
11
  export type { ResultIteratorOptions } from "./results.js";
12
12
  export { flightInfoToTable, iterateResults, queryToTable, ticketToTable } from "./results.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,YAAY,EAAE,sBAAsB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACrF,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAGpE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAG7F,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,WAAW,EACX,KAAK,UAAU,EACf,KAAK,MAAM,EACZ,MAAM,2BAA2B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,YAAY,EACV,oBAAoB,EACpB,sBAAsB,EACtB,aAAa,EACb,wBAAwB,EACxB,uBAAuB,EACvB,YAAY,EACZ,YAAY,EACb,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAGpE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAG7F,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,WAAW,EACX,KAAK,UAAU,EACf,KAAK,MAAM,EACZ,MAAM,2BAA2B,CAAA"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAIpE,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE7F,qDAAqD;AACrD,OAAO,EAIL,WAAW,EAGZ,MAAM,2BAA2B,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAYH,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAIpE,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE7F,qDAAqD;AACrD,OAAO,EAIL,WAAW,EAGZ,MAAM,2BAA2B,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qualithm/arrow-flight-sql-js",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "Arrow Flight SQL client for JavaScript and TypeScript runtimes.",
5
5
  "private": false,
6
6
  "type": "module",