@qualithm/arrow-flight-sql-js 0.0.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/LICENSE +18 -0
- package/README.md +433 -0
- package/dist/arrow.d.ts +65 -0
- package/dist/arrow.d.ts.map +1 -0
- package/dist/arrow.js +250 -0
- package/dist/arrow.js.map +1 -0
- package/dist/client.d.ts +416 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +1087 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +128 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +181 -0
- package/dist/errors.js.map +1 -0
- package/dist/generated/index.d.ts +4 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/index.js +33 -0
- package/dist/generated/index.js.map +1 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -0
- package/dist/metrics.d.ts +217 -0
- package/dist/metrics.d.ts.map +1 -0
- package/dist/metrics.js +304 -0
- package/dist/metrics.js.map +1 -0
- package/dist/pool.d.ts +161 -0
- package/dist/pool.d.ts.map +1 -0
- package/dist/pool.js +434 -0
- package/dist/pool.js.map +1 -0
- package/dist/proto.d.ts +168 -0
- package/dist/proto.d.ts.map +1 -0
- package/dist/proto.js +417 -0
- package/dist/proto.js.map +1 -0
- package/dist/query-builder.d.ts +1 -0
- package/dist/query-builder.d.ts.map +1 -0
- package/dist/query-builder.js +3 -0
- package/dist/query-builder.js.map +1 -0
- package/dist/retry.d.ts +92 -0
- package/dist/retry.d.ts.map +1 -0
- package/dist/retry.js +212 -0
- package/dist/retry.js.map +1 -0
- package/dist/types.d.ts +325 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +18 -0
- package/dist/types.js.map +1 -0
- package/package.json +82 -0
- package/proto/Flight.proto +645 -0
- package/proto/FlightSql.proto +1925 -0
package/dist/retry.d.ts
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Retry logic with exponential backoff for transient failures.
|
|
3
|
+
*
|
|
4
|
+
* Implements configurable retry strategies with:
|
|
5
|
+
* - Exponential backoff between attempts
|
|
6
|
+
* - Optional jitter to prevent thundering herd
|
|
7
|
+
* - Customizable retry conditions
|
|
8
|
+
* - gRPC status code awareness
|
|
9
|
+
*/
|
|
10
|
+
import type { RetryOptions } from "./types";
|
|
11
|
+
/**
|
|
12
|
+
* Check if a gRPC error is retryable based on its status code
|
|
13
|
+
*/
|
|
14
|
+
export declare function isRetryableGrpcError(error: unknown): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Default function to determine if an error is retryable.
|
|
17
|
+
* Handles gRPC errors and common network errors.
|
|
18
|
+
*/
|
|
19
|
+
export declare function defaultIsRetryable(error: unknown): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Calculate delay for a retry attempt with optional jitter
|
|
22
|
+
*/
|
|
23
|
+
export declare function calculateBackoffDelay(attempt: number, options: Required<Omit<RetryOptions, "isRetryable">>): number;
|
|
24
|
+
/**
|
|
25
|
+
* Result of a retry operation
|
|
26
|
+
*/
|
|
27
|
+
export interface RetryResult<T> {
|
|
28
|
+
/** The successful result value */
|
|
29
|
+
value: T;
|
|
30
|
+
/** Number of attempts made (1 = succeeded on first try) */
|
|
31
|
+
attempts: number;
|
|
32
|
+
/** Total time spent including delays (ms) */
|
|
33
|
+
totalTimeMs: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Execute a function with automatic retries on transient failures.
|
|
37
|
+
*
|
|
38
|
+
* @param operation - The async function to execute
|
|
39
|
+
* @param options - Retry configuration
|
|
40
|
+
* @returns The result of the operation
|
|
41
|
+
* @throws The last error if all retries are exhausted
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```typescript
|
|
45
|
+
* const result = await withRetry(
|
|
46
|
+
* async () => await client.query("SELECT 1"),
|
|
47
|
+
* { maxRetries: 3, initialDelayMs: 100 }
|
|
48
|
+
* )
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
export declare function withRetry<T>(operation: () => Promise<T>, options?: RetryOptions): Promise<RetryResult<T>>;
|
|
52
|
+
/**
|
|
53
|
+
* A retry policy that can be reused across multiple operations.
|
|
54
|
+
* Useful for applying consistent retry behavior.
|
|
55
|
+
*/
|
|
56
|
+
export declare class RetryPolicy {
|
|
57
|
+
private readonly config;
|
|
58
|
+
private readonly isRetryable;
|
|
59
|
+
constructor(options?: RetryOptions);
|
|
60
|
+
/**
|
|
61
|
+
* Execute an operation with this policy's retry configuration
|
|
62
|
+
*/
|
|
63
|
+
execute<T>(operation: () => Promise<T>): Promise<RetryResult<T>>;
|
|
64
|
+
/**
|
|
65
|
+
* Create a wrapped version of an async function that automatically retries
|
|
66
|
+
*/
|
|
67
|
+
wrap<T, TArgs extends unknown[]>(fn: (...args: TArgs) => Promise<T>): (...args: TArgs) => Promise<T>;
|
|
68
|
+
/**
|
|
69
|
+
* Check if an error would be retried by this policy
|
|
70
|
+
*/
|
|
71
|
+
wouldRetry(error: unknown): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Get the delay that would be used for a specific attempt
|
|
74
|
+
*/
|
|
75
|
+
getDelayForAttempt(attempt: number): number;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Pre-configured retry policies for common use cases
|
|
79
|
+
*/
|
|
80
|
+
export declare const retryPolicies: {
|
|
81
|
+
/** No retries - fail immediately */
|
|
82
|
+
readonly none: RetryPolicy;
|
|
83
|
+
/** Fast retries for low-latency operations */
|
|
84
|
+
readonly fast: RetryPolicy;
|
|
85
|
+
/** Default retry policy with moderate settings */
|
|
86
|
+
readonly default: RetryPolicy;
|
|
87
|
+
/** Aggressive retries for critical operations */
|
|
88
|
+
readonly aggressive: RetryPolicy;
|
|
89
|
+
/** Very long retries for reconnection scenarios */
|
|
90
|
+
readonly reconnection: RetryPolicy;
|
|
91
|
+
};
|
|
92
|
+
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AAE,EAC7B,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,GACjC,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC;IAOjC;;OAEG;IACH,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAInC;;OAEG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;CAG5C;AAED;;GAEG;AACH,eAAO,MAAM,aAAa;IACxB,oCAAoC;;IAGpC,8CAA8C;;IAQ9C,kDAAkD;;IAQlD,iDAAiD;;IAQjD,mDAAmD;;CAO3C,CAAA"}
|
package/dist/retry.js
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Retry logic with exponential backoff for transient failures.
|
|
3
|
+
*
|
|
4
|
+
* Implements configurable retry strategies with:
|
|
5
|
+
* - Exponential backoff between attempts
|
|
6
|
+
* - Optional jitter to prevent thundering herd
|
|
7
|
+
* - Customizable retry conditions
|
|
8
|
+
* - gRPC status code awareness
|
|
9
|
+
*/
|
|
10
|
+
import * as grpc from "@grpc/grpc-js";
|
|
11
|
+
// Default retry configuration
|
|
12
|
+
const defaultRetryOptions = {
|
|
13
|
+
maxRetries: 3,
|
|
14
|
+
initialDelayMs: 100,
|
|
15
|
+
maxDelayMs: 10_000,
|
|
16
|
+
backoffMultiplier: 2,
|
|
17
|
+
jitter: true
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* gRPC status codes that indicate transient failures worth retrying
|
|
21
|
+
*/
|
|
22
|
+
const retryableGrpcCodes = new Set([
|
|
23
|
+
grpc.status.UNAVAILABLE, // Server temporarily unavailable
|
|
24
|
+
grpc.status.RESOURCE_EXHAUSTED, // Rate limited or quota exceeded
|
|
25
|
+
grpc.status.ABORTED, // Transaction aborted, can retry
|
|
26
|
+
grpc.status.DEADLINE_EXCEEDED, // Timeout, might succeed on retry
|
|
27
|
+
grpc.status.INTERNAL // Internal error, might be transient
|
|
28
|
+
]);
|
|
29
|
+
/**
|
|
30
|
+
* Check if a gRPC error is retryable based on its status code
|
|
31
|
+
*/
|
|
32
|
+
export function isRetryableGrpcError(error) {
|
|
33
|
+
if (error instanceof Error && "code" in error) {
|
|
34
|
+
const code = error.code;
|
|
35
|
+
return retryableGrpcCodes.has(code);
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Default function to determine if an error is retryable.
|
|
41
|
+
* Handles gRPC errors and common network errors.
|
|
42
|
+
*/
|
|
43
|
+
export function defaultIsRetryable(error) {
|
|
44
|
+
// Check gRPC status codes
|
|
45
|
+
if (isRetryableGrpcError(error)) {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
// Check for common network errors
|
|
49
|
+
if (error instanceof Error) {
|
|
50
|
+
const message = error.message.toLowerCase();
|
|
51
|
+
return (message.includes("econnreset") ||
|
|
52
|
+
message.includes("econnrefused") ||
|
|
53
|
+
message.includes("etimedout") ||
|
|
54
|
+
message.includes("socket hang up") ||
|
|
55
|
+
message.includes("network error") ||
|
|
56
|
+
message.includes("connection reset"));
|
|
57
|
+
}
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Calculate delay for a retry attempt with optional jitter
|
|
62
|
+
*/
|
|
63
|
+
export function calculateBackoffDelay(attempt, options) {
|
|
64
|
+
// Exponential backoff: initialDelay * (multiplier ^ attempt)
|
|
65
|
+
const exponentialDelay = options.initialDelayMs * Math.pow(options.backoffMultiplier, attempt);
|
|
66
|
+
// Cap at maximum delay
|
|
67
|
+
const cappedDelay = Math.min(exponentialDelay, options.maxDelayMs);
|
|
68
|
+
// Add jitter (±25% of the delay) to prevent thundering herd
|
|
69
|
+
if (options.jitter) {
|
|
70
|
+
const jitterRange = cappedDelay * 0.25;
|
|
71
|
+
const jitter = Math.random() * jitterRange * 2 - jitterRange;
|
|
72
|
+
return Math.max(0, Math.round(cappedDelay + jitter));
|
|
73
|
+
}
|
|
74
|
+
return Math.round(cappedDelay);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Sleep for a specified duration
|
|
78
|
+
*/
|
|
79
|
+
function sleep(ms) {
|
|
80
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Execute a function with automatic retries on transient failures.
|
|
84
|
+
*
|
|
85
|
+
* @param operation - The async function to execute
|
|
86
|
+
* @param options - Retry configuration
|
|
87
|
+
* @returns The result of the operation
|
|
88
|
+
* @throws The last error if all retries are exhausted
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```typescript
|
|
92
|
+
* const result = await withRetry(
|
|
93
|
+
* async () => await client.query("SELECT 1"),
|
|
94
|
+
* { maxRetries: 3, initialDelayMs: 100 }
|
|
95
|
+
* )
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
export async function withRetry(operation, options = {}) {
|
|
99
|
+
const config = {
|
|
100
|
+
...defaultRetryOptions,
|
|
101
|
+
...options
|
|
102
|
+
};
|
|
103
|
+
const isRetryable = options.isRetryable ?? defaultIsRetryable;
|
|
104
|
+
const startTime = Date.now();
|
|
105
|
+
let lastError;
|
|
106
|
+
let attempt = 0;
|
|
107
|
+
while (attempt <= config.maxRetries) {
|
|
108
|
+
try {
|
|
109
|
+
const value = await operation();
|
|
110
|
+
return {
|
|
111
|
+
value,
|
|
112
|
+
attempts: attempt + 1,
|
|
113
|
+
totalTimeMs: Date.now() - startTime
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
lastError = error instanceof Error ? error : new Error(String(error));
|
|
118
|
+
// Check if we should retry
|
|
119
|
+
if (attempt >= config.maxRetries || !isRetryable(error)) {
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
// Calculate and wait for backoff delay
|
|
123
|
+
const delay = calculateBackoffDelay(attempt, config);
|
|
124
|
+
await sleep(delay);
|
|
125
|
+
attempt++;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
// All retries exhausted or non-retryable error
|
|
129
|
+
// lastError is guaranteed to be set if we reach here (we only break after catching)
|
|
130
|
+
throw lastError ?? new Error("Retry failed with unknown error");
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* A retry policy that can be reused across multiple operations.
|
|
134
|
+
* Useful for applying consistent retry behavior.
|
|
135
|
+
*/
|
|
136
|
+
export class RetryPolicy {
|
|
137
|
+
config;
|
|
138
|
+
isRetryable;
|
|
139
|
+
constructor(options = {}) {
|
|
140
|
+
this.config = {
|
|
141
|
+
...defaultRetryOptions,
|
|
142
|
+
...options
|
|
143
|
+
};
|
|
144
|
+
this.isRetryable = options.isRetryable ?? defaultIsRetryable;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Execute an operation with this policy's retry configuration
|
|
148
|
+
*/
|
|
149
|
+
async execute(operation) {
|
|
150
|
+
return withRetry(operation, {
|
|
151
|
+
...this.config,
|
|
152
|
+
isRetryable: this.isRetryable
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Create a wrapped version of an async function that automatically retries
|
|
157
|
+
*/
|
|
158
|
+
wrap(fn) {
|
|
159
|
+
return async (...args) => {
|
|
160
|
+
const result = await this.execute(() => fn(...args));
|
|
161
|
+
return result.value;
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Check if an error would be retried by this policy
|
|
166
|
+
*/
|
|
167
|
+
wouldRetry(error) {
|
|
168
|
+
return this.isRetryable(error);
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Get the delay that would be used for a specific attempt
|
|
172
|
+
*/
|
|
173
|
+
getDelayForAttempt(attempt) {
|
|
174
|
+
return calculateBackoffDelay(attempt, this.config);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Pre-configured retry policies for common use cases
|
|
179
|
+
*/
|
|
180
|
+
export const retryPolicies = {
|
|
181
|
+
/** No retries - fail immediately */
|
|
182
|
+
none: new RetryPolicy({ maxRetries: 0 }),
|
|
183
|
+
/** Fast retries for low-latency operations */
|
|
184
|
+
fast: new RetryPolicy({
|
|
185
|
+
maxRetries: 3,
|
|
186
|
+
initialDelayMs: 50,
|
|
187
|
+
maxDelayMs: 500,
|
|
188
|
+
backoffMultiplier: 2
|
|
189
|
+
}),
|
|
190
|
+
/** Default retry policy with moderate settings */
|
|
191
|
+
default: new RetryPolicy({
|
|
192
|
+
maxRetries: 3,
|
|
193
|
+
initialDelayMs: 100,
|
|
194
|
+
maxDelayMs: 10_000,
|
|
195
|
+
backoffMultiplier: 2
|
|
196
|
+
}),
|
|
197
|
+
/** Aggressive retries for critical operations */
|
|
198
|
+
aggressive: new RetryPolicy({
|
|
199
|
+
maxRetries: 5,
|
|
200
|
+
initialDelayMs: 200,
|
|
201
|
+
maxDelayMs: 30_000,
|
|
202
|
+
backoffMultiplier: 2
|
|
203
|
+
}),
|
|
204
|
+
/** Very long retries for reconnection scenarios */
|
|
205
|
+
reconnection: new RetryPolicy({
|
|
206
|
+
maxRetries: 10,
|
|
207
|
+
initialDelayMs: 1_000,
|
|
208
|
+
maxDelayMs: 60_000,
|
|
209
|
+
backoffMultiplier: 2
|
|
210
|
+
})
|
|
211
|
+
};
|
|
212
|
+
//# sourceMappingURL=retry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,IAAI,MAAM,eAAe,CAAA;AAIrC,8BAA8B;AAC9B,MAAM,mBAAmB,GAAgD;IACvE,UAAU,EAAE,CAAC;IACb,cAAc,EAAE,GAAG;IACnB,UAAU,EAAE,MAAM;IAClB,iBAAiB,EAAE,CAAC;IACpB,MAAM,EAAE,IAAI;C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BAAiB,EAAE,CAAC;KACrB,CAAC;CACM,CAAA"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Arrow Flight SQL TypeScript type definitions
|
|
3
|
+
*
|
|
4
|
+
* These types map to the Protocol Buffer messages defined in:
|
|
5
|
+
* - Flight.proto (arrow.flight.protocol)
|
|
6
|
+
* - FlightSql.proto (arrow.flight.protocol.sql)
|
|
7
|
+
*/
|
|
8
|
+
import type { ChannelCredentials } from "@grpc/grpc-js";
|
|
9
|
+
import type { RecordBatch, Schema, Table } from "apache-arrow";
|
|
10
|
+
/**
|
|
11
|
+
* Configuration options for creating a FlightSqlClient
|
|
12
|
+
*/
|
|
13
|
+
export interface FlightSqlClientOptions {
|
|
14
|
+
/** Host address of the Flight SQL server */
|
|
15
|
+
host: string;
|
|
16
|
+
/** Port number (default: 443 for TLS, 80 for insecure) */
|
|
17
|
+
port: number;
|
|
18
|
+
/** Use TLS for connection (default: true) */
|
|
19
|
+
tls?: boolean;
|
|
20
|
+
/** Custom channel credentials (overrides tls option) */
|
|
21
|
+
credentials?: ChannelCredentials;
|
|
22
|
+
/** Authentication configuration */
|
|
23
|
+
auth?: AuthConfig;
|
|
24
|
+
/** Connection timeout in milliseconds (default: 30000) */
|
|
25
|
+
connectTimeoutMs?: number;
|
|
26
|
+
/** Request timeout in milliseconds (default: 60000) */
|
|
27
|
+
requestTimeoutMs?: number;
|
|
28
|
+
/** Custom metadata to include with every request */
|
|
29
|
+
metadata?: Record<string, string>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Authentication configuration
|
|
33
|
+
*/
|
|
34
|
+
export type AuthConfig = {
|
|
35
|
+
type: "bearer";
|
|
36
|
+
token: string;
|
|
37
|
+
} | {
|
|
38
|
+
type: "basic";
|
|
39
|
+
username: string;
|
|
40
|
+
password: string;
|
|
41
|
+
} | {
|
|
42
|
+
type: "none";
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Result of a handshake operation
|
|
46
|
+
*/
|
|
47
|
+
export interface HandshakeResult {
|
|
48
|
+
/** Protocol version negotiated with server */
|
|
49
|
+
protocolVersion: bigint;
|
|
50
|
+
/** Authentication token or other payload from server */
|
|
51
|
+
payload: Uint8Array;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Describes what type of FlightDescriptor is defined
|
|
55
|
+
*/
|
|
56
|
+
export declare const DescriptorType: {
|
|
57
|
+
readonly UNKNOWN: 0;
|
|
58
|
+
/** A named path identifying a dataset */
|
|
59
|
+
readonly PATH: 1;
|
|
60
|
+
/** An opaque command to generate a dataset */
|
|
61
|
+
readonly CMD: 2;
|
|
62
|
+
};
|
|
63
|
+
export type DescriptorType = (typeof DescriptorType)[keyof typeof DescriptorType];
|
|
64
|
+
/**
|
|
65
|
+
* The name or tag for a Flight. Used to retrieve or generate a flight.
|
|
66
|
+
*/
|
|
67
|
+
export interface FlightDescriptor {
|
|
68
|
+
type: DescriptorType;
|
|
69
|
+
/** Opaque command value (when type = CMD) */
|
|
70
|
+
cmd?: Uint8Array;
|
|
71
|
+
/** List of strings identifying a dataset (when type = PATH) */
|
|
72
|
+
path?: string[];
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* An opaque identifier for retrieving a portion of a stream
|
|
76
|
+
*/
|
|
77
|
+
export interface Ticket {
|
|
78
|
+
ticket: Uint8Array;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* A location where a Flight service accepts retrieval requests
|
|
82
|
+
*/
|
|
83
|
+
export interface Location {
|
|
84
|
+
uri: string;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* A particular stream or split associated with a flight
|
|
88
|
+
*/
|
|
89
|
+
export interface FlightEndpoint {
|
|
90
|
+
/** Token used to retrieve this stream */
|
|
91
|
+
ticket: Ticket;
|
|
92
|
+
/** URIs where this ticket can be redeemed */
|
|
93
|
+
locations: Location[];
|
|
94
|
+
/** Expiration time for this endpoint */
|
|
95
|
+
expirationTime?: Date;
|
|
96
|
+
/** Application-defined metadata */
|
|
97
|
+
appMetadata?: Uint8Array;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Access coordinates for retrieval of a dataset
|
|
101
|
+
*/
|
|
102
|
+
export interface FlightInfo {
|
|
103
|
+
/** Arrow schema in IPC format */
|
|
104
|
+
schema: Uint8Array;
|
|
105
|
+
/** The descriptor associated with this info */
|
|
106
|
+
flightDescriptor?: FlightDescriptor;
|
|
107
|
+
/** Endpoints to consume the flight data */
|
|
108
|
+
endpoints: FlightEndpoint[];
|
|
109
|
+
/** Total number of records (-1 if unknown) */
|
|
110
|
+
totalRecords: bigint;
|
|
111
|
+
/** Total size in bytes (-1 if unknown) */
|
|
112
|
+
totalBytes: bigint;
|
|
113
|
+
/** Whether endpoints are ordered */
|
|
114
|
+
ordered: boolean;
|
|
115
|
+
/** Application-defined metadata */
|
|
116
|
+
appMetadata?: Uint8Array;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Schema result from GetSchema call
|
|
120
|
+
*/
|
|
121
|
+
export interface SchemaResult {
|
|
122
|
+
/** Arrow schema in IPC format */
|
|
123
|
+
schema: Uint8Array;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* A batch of Arrow data as part of a stream
|
|
127
|
+
*/
|
|
128
|
+
export interface FlightData {
|
|
129
|
+
/** Descriptor of the data (for DoPut streams) */
|
|
130
|
+
flightDescriptor?: FlightDescriptor;
|
|
131
|
+
/** Message header as described in Message.fbs */
|
|
132
|
+
dataHeader: Uint8Array;
|
|
133
|
+
/** Application-defined metadata */
|
|
134
|
+
appMetadata?: Uint8Array;
|
|
135
|
+
/** The actual Arrow data batch */
|
|
136
|
+
dataBody: Uint8Array;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Response from DoPut submission
|
|
140
|
+
*/
|
|
141
|
+
export interface PutResult {
|
|
142
|
+
appMetadata?: Uint8Array;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* An action to execute on the Flight service
|
|
146
|
+
*/
|
|
147
|
+
export interface Action {
|
|
148
|
+
type: string;
|
|
149
|
+
body?: Uint8Array;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Result from executing an action
|
|
153
|
+
*/
|
|
154
|
+
export interface ActionResult {
|
|
155
|
+
body: Uint8Array;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Describes an available action type
|
|
159
|
+
*/
|
|
160
|
+
export interface ActionType {
|
|
161
|
+
type: string;
|
|
162
|
+
description: string;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Options for executing SQL statements
|
|
166
|
+
*/
|
|
167
|
+
export interface ExecuteOptions {
|
|
168
|
+
/** Query timeout in seconds */
|
|
169
|
+
timeoutSeconds?: number;
|
|
170
|
+
/** Transaction ID for transactional queries */
|
|
171
|
+
transactionId?: Uint8Array;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Options for prepared statements
|
|
175
|
+
*/
|
|
176
|
+
export interface PreparedStatementOptions {
|
|
177
|
+
/** Transaction ID for transactional operations */
|
|
178
|
+
transactionId?: Uint8Array;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Result from creating a prepared statement
|
|
182
|
+
*/
|
|
183
|
+
export interface PreparedStatementResult {
|
|
184
|
+
/** Opaque handle for the prepared statement */
|
|
185
|
+
handle: Uint8Array;
|
|
186
|
+
/** Schema of the result set (if query returns data) */
|
|
187
|
+
datasetSchema?: Schema;
|
|
188
|
+
/** Schema of the parameters */
|
|
189
|
+
parameterSchema?: Schema;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Update result from DML statements
|
|
193
|
+
*/
|
|
194
|
+
export interface UpdateResult {
|
|
195
|
+
/** Number of rows affected */
|
|
196
|
+
recordCount: bigint;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Catalog information
|
|
200
|
+
*/
|
|
201
|
+
export interface CatalogInfo {
|
|
202
|
+
catalogName: string;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Schema information within a catalog
|
|
206
|
+
*/
|
|
207
|
+
export interface SchemaInfo {
|
|
208
|
+
catalogName?: string;
|
|
209
|
+
schemaName: string;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Table information
|
|
213
|
+
*/
|
|
214
|
+
export interface TableInfo {
|
|
215
|
+
catalogName?: string;
|
|
216
|
+
schemaName?: string;
|
|
217
|
+
tableName: string;
|
|
218
|
+
tableType: string;
|
|
219
|
+
schema?: Schema;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Table type names (e.g., "TABLE", "VIEW", "SYSTEM TABLE")
|
|
223
|
+
*/
|
|
224
|
+
export interface TableType {
|
|
225
|
+
tableType: string;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Primary key information
|
|
229
|
+
*/
|
|
230
|
+
export interface PrimaryKeyInfo {
|
|
231
|
+
catalogName?: string;
|
|
232
|
+
schemaName?: string;
|
|
233
|
+
tableName: string;
|
|
234
|
+
columnName: string;
|
|
235
|
+
keySequence: number;
|
|
236
|
+
keyName?: string;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Foreign key information
|
|
240
|
+
*/
|
|
241
|
+
export interface ForeignKeyInfo {
|
|
242
|
+
pkCatalogName?: string;
|
|
243
|
+
pkSchemaName?: string;
|
|
244
|
+
pkTableName: string;
|
|
245
|
+
pkColumnName: string;
|
|
246
|
+
fkCatalogName?: string;
|
|
247
|
+
fkSchemaName?: string;
|
|
248
|
+
fkTableName: string;
|
|
249
|
+
fkColumnName: string;
|
|
250
|
+
keySequence: number;
|
|
251
|
+
fkKeyName?: string;
|
|
252
|
+
pkKeyName?: string;
|
|
253
|
+
updateRule: number;
|
|
254
|
+
deleteRule: number;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Async iterator for streaming Arrow record batches
|
|
258
|
+
*/
|
|
259
|
+
export type RecordBatchStream = AsyncIterable<RecordBatch>;
|
|
260
|
+
/**
|
|
261
|
+
* Result from a query execution
|
|
262
|
+
*/
|
|
263
|
+
export interface QueryResult {
|
|
264
|
+
/** Flight info containing endpoints for data retrieval */
|
|
265
|
+
flightInfo: FlightInfo;
|
|
266
|
+
/** Parsed Arrow schema */
|
|
267
|
+
schema: Schema;
|
|
268
|
+
/**
|
|
269
|
+
* Stream all record batches from all endpoints
|
|
270
|
+
*/
|
|
271
|
+
stream(): RecordBatchStream;
|
|
272
|
+
/**
|
|
273
|
+
* Collect all data into a single Table
|
|
274
|
+
* Warning: Loads entire result set into memory
|
|
275
|
+
*/
|
|
276
|
+
collect(): Promise<Table>;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Connection pool configuration
|
|
280
|
+
*/
|
|
281
|
+
export interface PoolOptions {
|
|
282
|
+
/** Minimum number of connections to maintain */
|
|
283
|
+
minConnections?: number;
|
|
284
|
+
/** Maximum number of connections allowed */
|
|
285
|
+
maxConnections?: number;
|
|
286
|
+
/** Time in ms before an idle connection is closed */
|
|
287
|
+
idleTimeoutMs?: number;
|
|
288
|
+
/** Time in ms to wait for a connection from the pool */
|
|
289
|
+
acquireTimeoutMs?: number;
|
|
290
|
+
/** Enable connection health checking */
|
|
291
|
+
healthCheck?: boolean;
|
|
292
|
+
/** Interval in ms between health checks */
|
|
293
|
+
healthCheckIntervalMs?: number;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Pool statistics for monitoring
|
|
297
|
+
*/
|
|
298
|
+
export interface PoolStats {
|
|
299
|
+
/** Total connections in pool */
|
|
300
|
+
totalConnections: number;
|
|
301
|
+
/** Connections currently in use */
|
|
302
|
+
activeConnections: number;
|
|
303
|
+
/** Connections available for use */
|
|
304
|
+
idleConnections: number;
|
|
305
|
+
/** Requests waiting for a connection */
|
|
306
|
+
pendingRequests: number;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Retry configuration for transient failures
|
|
310
|
+
*/
|
|
311
|
+
export interface RetryOptions {
|
|
312
|
+
/** Maximum number of retry attempts */
|
|
313
|
+
maxRetries?: number;
|
|
314
|
+
/** Initial delay in ms before first retry */
|
|
315
|
+
initialDelayMs?: number;
|
|
316
|
+
/** Maximum delay in ms between retries */
|
|
317
|
+
maxDelayMs?: number;
|
|
318
|
+
/** Multiplier for exponential backoff */
|
|
319
|
+
backoffMultiplier?: number;
|
|
320
|
+
/** Add random jitter to delays */
|
|
321
|
+
jitter?: boolean;
|
|
322
|
+
/** Custom function to determine if error is retryable */
|
|
323
|
+
isRetryable?: (error: unknown) => boolean;
|
|
324
|
+
}
|
|
325
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAM9D;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAA;IAEZ,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAA;IAEZ,6CAA6C;IAC7C,GAAG,CAAC,EAAE,OAAO,CAAA;IAEb,wDAAwD;IACxD,WAAW,CAAC,EAAE,kBAAkB,CAAA;IAEhC,mCAAmC;IACnC,IAAI,CAAC,EAAE,UAAU,CAAA;IAEjB,0DAA0D;IAC1D,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAEzB,uDAAuD;IACvD,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAEzB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAClC;AAED;;GAEG;AACH,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,CAAA;IAEvB,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB,yCAAyC;IACzC,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAE1B,kCAAkC;IAClC,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB,yDAAyD;IACzD,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAA;CAC1C"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Arrow Flight SQL TypeScript type definitions
|
|
3
|
+
*
|
|
4
|
+
* These types map to the Protocol Buffer messages defined in:
|
|
5
|
+
* - Flight.proto (arrow.flight.protocol)
|
|
6
|
+
* - FlightSql.proto (arrow.flight.protocol.sql)
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Describes what type of FlightDescriptor is defined
|
|
10
|
+
*/
|
|
11
|
+
export const DescriptorType = {
|
|
12
|
+
UNKNOWN: 0,
|
|
13
|
+
/** A named path identifying a dataset */
|
|
14
|
+
PATH: 1,
|
|
15
|
+
/** An opaque command to generate a dataset */
|
|
16
|
+
CMD: 2
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA6DH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO,EAAE,CAAC;IACV,yCAAyC;IACzC,IAAI,EAAE,CAAC;IACP,8CAA8C;IAC9C,GAAG,EAAE,CAAC;CACE,CAAA"}
|