@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/proto.d.ts
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Protobuf encoding utilities for Flight SQL commands
|
|
3
|
+
*
|
|
4
|
+
* Flight SQL uses protobuf "Any" type messages in FlightDescriptor.cmd.
|
|
5
|
+
* The encoding format is:
|
|
6
|
+
* - Type URL field (field 1, length-delimited): type.googleapis.com/...
|
|
7
|
+
* - Value field (field 2, length-delimited): serialized protobuf message
|
|
8
|
+
*
|
|
9
|
+
* This module provides manual protobuf encoding without requiring a full
|
|
10
|
+
* protobuf runtime library, keeping the bundle size small.
|
|
11
|
+
*/
|
|
12
|
+
export declare const TypeUrls: {
|
|
13
|
+
readonly commandStatementQuery: "type.googleapis.com/arrow.flight.protocol.sql.CommandStatementQuery";
|
|
14
|
+
readonly commandStatementUpdate: "type.googleapis.com/arrow.flight.protocol.sql.CommandStatementUpdate";
|
|
15
|
+
readonly commandPreparedStatementQuery: "type.googleapis.com/arrow.flight.protocol.sql.CommandPreparedStatementQuery";
|
|
16
|
+
readonly commandPreparedStatementUpdate: "type.googleapis.com/arrow.flight.protocol.sql.CommandPreparedStatementUpdate";
|
|
17
|
+
readonly commandGetCatalogs: "type.googleapis.com/arrow.flight.protocol.sql.CommandGetCatalogs";
|
|
18
|
+
readonly commandGetDbSchemas: "type.googleapis.com/arrow.flight.protocol.sql.CommandGetDbSchemas";
|
|
19
|
+
readonly commandGetTables: "type.googleapis.com/arrow.flight.protocol.sql.CommandGetTables";
|
|
20
|
+
readonly commandGetTableTypes: "type.googleapis.com/arrow.flight.protocol.sql.CommandGetTableTypes";
|
|
21
|
+
readonly commandGetPrimaryKeys: "type.googleapis.com/arrow.flight.protocol.sql.CommandGetPrimaryKeys";
|
|
22
|
+
readonly commandGetExportedKeys: "type.googleapis.com/arrow.flight.protocol.sql.CommandGetExportedKeys";
|
|
23
|
+
readonly commandGetImportedKeys: "type.googleapis.com/arrow.flight.protocol.sql.CommandGetImportedKeys";
|
|
24
|
+
readonly commandGetSqlInfo: "type.googleapis.com/arrow.flight.protocol.sql.CommandGetSqlInfo";
|
|
25
|
+
readonly actionCreatePreparedStatementRequest: "type.googleapis.com/arrow.flight.protocol.sql.ActionCreatePreparedStatementRequest";
|
|
26
|
+
readonly actionClosePreparedStatementRequest: "type.googleapis.com/arrow.flight.protocol.sql.ActionClosePreparedStatementRequest";
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Encode CommandStatementQuery message
|
|
30
|
+
*
|
|
31
|
+
* message CommandStatementQuery {
|
|
32
|
+
* string query = 1;
|
|
33
|
+
* optional bytes transaction_id = 2;
|
|
34
|
+
* }
|
|
35
|
+
*/
|
|
36
|
+
export declare function encodeCommandStatementQuery(query: string, transactionId?: Uint8Array): Uint8Array;
|
|
37
|
+
/**
|
|
38
|
+
* Encode CommandStatementUpdate message
|
|
39
|
+
*
|
|
40
|
+
* message CommandStatementUpdate {
|
|
41
|
+
* string query = 1;
|
|
42
|
+
* optional bytes transaction_id = 2;
|
|
43
|
+
* }
|
|
44
|
+
*/
|
|
45
|
+
export declare function encodeCommandStatementUpdate(query: string, transactionId?: Uint8Array): Uint8Array;
|
|
46
|
+
/**
|
|
47
|
+
* Encode CommandPreparedStatementQuery message
|
|
48
|
+
*
|
|
49
|
+
* message CommandPreparedStatementQuery {
|
|
50
|
+
* bytes prepared_statement_handle = 1;
|
|
51
|
+
* }
|
|
52
|
+
*/
|
|
53
|
+
export declare function encodeCommandPreparedStatementQuery(preparedStatementHandle: Uint8Array): Uint8Array;
|
|
54
|
+
/**
|
|
55
|
+
* Encode CommandPreparedStatementUpdate message
|
|
56
|
+
*
|
|
57
|
+
* message CommandPreparedStatementUpdate {
|
|
58
|
+
* bytes prepared_statement_handle = 1;
|
|
59
|
+
* }
|
|
60
|
+
*/
|
|
61
|
+
export declare function encodeCommandPreparedStatementUpdate(preparedStatementHandle: Uint8Array): Uint8Array;
|
|
62
|
+
/**
|
|
63
|
+
* Encode ActionCreatePreparedStatementRequest message
|
|
64
|
+
*
|
|
65
|
+
* message ActionCreatePreparedStatementRequest {
|
|
66
|
+
* string query = 1;
|
|
67
|
+
* optional bytes transaction_id = 2;
|
|
68
|
+
* }
|
|
69
|
+
*/
|
|
70
|
+
export declare function encodeActionCreatePreparedStatementRequest(query: string, transactionId?: Uint8Array): Uint8Array;
|
|
71
|
+
/**
|
|
72
|
+
* Encode ActionClosePreparedStatementRequest message
|
|
73
|
+
*
|
|
74
|
+
* message ActionClosePreparedStatementRequest {
|
|
75
|
+
* bytes prepared_statement_handle = 1;
|
|
76
|
+
* }
|
|
77
|
+
*/
|
|
78
|
+
export declare function encodeActionClosePreparedStatementRequest(preparedStatementHandle: Uint8Array): Uint8Array;
|
|
79
|
+
/**
|
|
80
|
+
* Encode CommandGetCatalogs message (empty message)
|
|
81
|
+
*/
|
|
82
|
+
export declare function encodeCommandGetCatalogs(): Uint8Array;
|
|
83
|
+
/**
|
|
84
|
+
* Encode CommandGetDbSchemas message
|
|
85
|
+
*
|
|
86
|
+
* message CommandGetDbSchemas {
|
|
87
|
+
* optional string catalog = 1;
|
|
88
|
+
* optional string db_schema_filter_pattern = 2;
|
|
89
|
+
* }
|
|
90
|
+
*/
|
|
91
|
+
export declare function encodeCommandGetDbSchemas(catalog?: string, dbSchemaFilterPattern?: string): Uint8Array;
|
|
92
|
+
/**
|
|
93
|
+
* Encode CommandGetTables message
|
|
94
|
+
*
|
|
95
|
+
* message CommandGetTables {
|
|
96
|
+
* optional string catalog = 1;
|
|
97
|
+
* optional string db_schema_filter_pattern = 2;
|
|
98
|
+
* optional string table_name_filter_pattern = 3;
|
|
99
|
+
* repeated string table_types = 4;
|
|
100
|
+
* bool include_schema = 5;
|
|
101
|
+
* }
|
|
102
|
+
*/
|
|
103
|
+
export declare function encodeCommandGetTables(options: {
|
|
104
|
+
catalog?: string;
|
|
105
|
+
dbSchemaFilterPattern?: string;
|
|
106
|
+
tableNameFilterPattern?: string;
|
|
107
|
+
tableTypes?: string[];
|
|
108
|
+
includeSchema?: boolean;
|
|
109
|
+
}): Uint8Array;
|
|
110
|
+
/**
|
|
111
|
+
* Encode CommandGetTableTypes message (empty message)
|
|
112
|
+
*/
|
|
113
|
+
export declare function encodeCommandGetTableTypes(): Uint8Array;
|
|
114
|
+
/**
|
|
115
|
+
* Encode CommandGetPrimaryKeys message
|
|
116
|
+
*
|
|
117
|
+
* message CommandGetPrimaryKeys {
|
|
118
|
+
* optional string catalog = 1;
|
|
119
|
+
* optional string db_schema = 2;
|
|
120
|
+
* string table = 3;
|
|
121
|
+
* }
|
|
122
|
+
*/
|
|
123
|
+
export declare function encodeCommandGetPrimaryKeys(table: string, catalog?: string, dbSchema?: string): Uint8Array;
|
|
124
|
+
/**
|
|
125
|
+
* Encode CommandGetExportedKeys message
|
|
126
|
+
*
|
|
127
|
+
* message CommandGetExportedKeys {
|
|
128
|
+
* optional string catalog = 1;
|
|
129
|
+
* optional string db_schema = 2;
|
|
130
|
+
* string table = 3;
|
|
131
|
+
* }
|
|
132
|
+
*/
|
|
133
|
+
export declare function encodeCommandGetExportedKeys(table: string, catalog?: string, dbSchema?: string): Uint8Array;
|
|
134
|
+
/**
|
|
135
|
+
* Encode CommandGetImportedKeys message
|
|
136
|
+
*
|
|
137
|
+
* message CommandGetImportedKeys {
|
|
138
|
+
* optional string catalog = 1;
|
|
139
|
+
* optional string db_schema = 2;
|
|
140
|
+
* string table = 3;
|
|
141
|
+
* }
|
|
142
|
+
*/
|
|
143
|
+
export declare function encodeCommandGetImportedKeys(table: string, catalog?: string, dbSchema?: string): Uint8Array;
|
|
144
|
+
/**
|
|
145
|
+
* Simple protobuf field reader for decoding responses
|
|
146
|
+
*/
|
|
147
|
+
export interface ProtoField {
|
|
148
|
+
fieldNumber: number;
|
|
149
|
+
wireType: number;
|
|
150
|
+
value: Uint8Array | number | bigint;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Parse protobuf fields from a buffer
|
|
154
|
+
*/
|
|
155
|
+
export declare function parseProtoFields(buffer: Uint8Array): ProtoField[];
|
|
156
|
+
/**
|
|
157
|
+
* Get a string field from parsed proto fields
|
|
158
|
+
*/
|
|
159
|
+
export declare function getStringField(fields: ProtoField[], fieldNumber: number): string | undefined;
|
|
160
|
+
/**
|
|
161
|
+
* Get a bytes field from parsed proto fields
|
|
162
|
+
*/
|
|
163
|
+
export declare function getBytesField(fields: ProtoField[], fieldNumber: number): Uint8Array | undefined;
|
|
164
|
+
/**
|
|
165
|
+
* Get a number field from parsed proto fields
|
|
166
|
+
*/
|
|
167
|
+
export declare function getNumberField(fields: ProtoField[], fieldNumber: number): number | undefined;
|
|
168
|
+
//# sourceMappingURL=proto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proto.d.ts","sourceRoot":"","sources":["../src/proto.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAQH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;CAeX,CAAA;AAyGV;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,UAAU,GAAG,UAAU,CASjG;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,MAAM,EACb,aAAa,CAAC,EAAE,UAAU,GACzB,UAAU,CASZ;AAED;;;;;;GAMG;AACH,wBAAgB,mCAAmC,CACjD,uBAAuB,EAAE,UAAU,GAClC,UAAU,CAGZ;AAED;;;;;;GAMG;AACH,wBAAgB,oCAAoC,CAClD,uBAAuB,EAAE,UAAU,GAClC,UAAU,CAGZ;AAED;;;;;;;GAOG;AACH,wBAAgB,0CAA0C,CACxD,KAAK,EAAE,MAAM,EACb,aAAa,CAAC,EAAE,UAAU,GACzB,UAAU,CASZ;AAED;;;;;;GAMG;AACH,wBAAgB,yCAAyC,CACvD,uBAAuB,EAAE,UAAU,GAClC,UAAU,CAGZ;AAED;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,UAAU,CAErD;AAED;;;;;;;GAOG;AACH,wBAAgB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AEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAM/F;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAM5F"}
|
package/dist/proto.js
ADDED
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Protobuf encoding utilities for Flight SQL commands
|
|
3
|
+
*
|
|
4
|
+
* Flight SQL uses protobuf "Any" type messages in FlightDescriptor.cmd.
|
|
5
|
+
* The encoding format is:
|
|
6
|
+
* - Type URL field (field 1, length-delimited): type.googleapis.com/...
|
|
7
|
+
* - Value field (field 2, length-delimited): serialized protobuf message
|
|
8
|
+
*
|
|
9
|
+
* This module provides manual protobuf encoding without requiring a full
|
|
10
|
+
* protobuf runtime library, keeping the bundle size small.
|
|
11
|
+
*/
|
|
12
|
+
// ============================================================================
|
|
13
|
+
// Type URLs for Flight SQL commands
|
|
14
|
+
// ============================================================================
|
|
15
|
+
const typeUrlPrefix = "type.googleapis.com/arrow.flight.protocol.sql.";
|
|
16
|
+
export const TypeUrls = {
|
|
17
|
+
commandStatementQuery: `${typeUrlPrefix}CommandStatementQuery`,
|
|
18
|
+
commandStatementUpdate: `${typeUrlPrefix}CommandStatementUpdate`,
|
|
19
|
+
commandPreparedStatementQuery: `${typeUrlPrefix}CommandPreparedStatementQuery`,
|
|
20
|
+
commandPreparedStatementUpdate: `${typeUrlPrefix}CommandPreparedStatementUpdate`,
|
|
21
|
+
commandGetCatalogs: `${typeUrlPrefix}CommandGetCatalogs`,
|
|
22
|
+
commandGetDbSchemas: `${typeUrlPrefix}CommandGetDbSchemas`,
|
|
23
|
+
commandGetTables: `${typeUrlPrefix}CommandGetTables`,
|
|
24
|
+
commandGetTableTypes: `${typeUrlPrefix}CommandGetTableTypes`,
|
|
25
|
+
commandGetPrimaryKeys: `${typeUrlPrefix}CommandGetPrimaryKeys`,
|
|
26
|
+
commandGetExportedKeys: `${typeUrlPrefix}CommandGetExportedKeys`,
|
|
27
|
+
commandGetImportedKeys: `${typeUrlPrefix}CommandGetImportedKeys`,
|
|
28
|
+
commandGetSqlInfo: `${typeUrlPrefix}CommandGetSqlInfo`,
|
|
29
|
+
actionCreatePreparedStatementRequest: `${typeUrlPrefix}ActionCreatePreparedStatementRequest`,
|
|
30
|
+
actionClosePreparedStatementRequest: `${typeUrlPrefix}ActionClosePreparedStatementRequest`
|
|
31
|
+
};
|
|
32
|
+
// ============================================================================
|
|
33
|
+
// Protobuf wire format encoding
|
|
34
|
+
// ============================================================================
|
|
35
|
+
/**
|
|
36
|
+
* Protobuf wire types
|
|
37
|
+
*/
|
|
38
|
+
const wireType = {
|
|
39
|
+
varint: 0,
|
|
40
|
+
fixed64: 1,
|
|
41
|
+
lengthDelimited: 2,
|
|
42
|
+
fixed32: 5
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Encode a varint (variable-length integer)
|
|
46
|
+
*/
|
|
47
|
+
function encodeVarint(value) {
|
|
48
|
+
const bytes = [];
|
|
49
|
+
let v = value >>> 0; // Ensure unsigned
|
|
50
|
+
while (v > 0x7f) {
|
|
51
|
+
bytes.push((v & 0x7f) | 0x80);
|
|
52
|
+
v >>>= 7;
|
|
53
|
+
}
|
|
54
|
+
bytes.push(v);
|
|
55
|
+
return new Uint8Array(bytes);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Encode a field tag (field number + wire type)
|
|
59
|
+
*/
|
|
60
|
+
function encodeTag(fieldNumber, wt) {
|
|
61
|
+
return encodeVarint((fieldNumber << 3) | wt);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Encode a string as a length-delimited field
|
|
65
|
+
*/
|
|
66
|
+
function encodeString(fieldNumber, value) {
|
|
67
|
+
const encoder = new TextEncoder();
|
|
68
|
+
const bytes = encoder.encode(value);
|
|
69
|
+
const tag = encodeTag(fieldNumber, wireType.lengthDelimited);
|
|
70
|
+
const length = encodeVarint(bytes.length);
|
|
71
|
+
const result = new Uint8Array(tag.length + length.length + bytes.length);
|
|
72
|
+
result.set(tag, 0);
|
|
73
|
+
result.set(length, tag.length);
|
|
74
|
+
result.set(bytes, tag.length + length.length);
|
|
75
|
+
return result;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Encode bytes as a length-delimited field
|
|
79
|
+
*/
|
|
80
|
+
function encodeBytes(fieldNumber, value) {
|
|
81
|
+
const tag = encodeTag(fieldNumber, wireType.lengthDelimited);
|
|
82
|
+
const length = encodeVarint(value.length);
|
|
83
|
+
const result = new Uint8Array(tag.length + length.length + value.length);
|
|
84
|
+
result.set(tag, 0);
|
|
85
|
+
result.set(length, tag.length);
|
|
86
|
+
result.set(value, tag.length + length.length);
|
|
87
|
+
return result;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Concatenate multiple Uint8Arrays
|
|
91
|
+
*/
|
|
92
|
+
function concat(...arrays) {
|
|
93
|
+
const totalLength = arrays.reduce((sum, arr) => sum + arr.length, 0);
|
|
94
|
+
const result = new Uint8Array(totalLength);
|
|
95
|
+
let offset = 0;
|
|
96
|
+
for (const arr of arrays) {
|
|
97
|
+
result.set(arr, offset);
|
|
98
|
+
offset += arr.length;
|
|
99
|
+
}
|
|
100
|
+
return result;
|
|
101
|
+
}
|
|
102
|
+
// ============================================================================
|
|
103
|
+
// Flight SQL Command Encoders
|
|
104
|
+
// ============================================================================
|
|
105
|
+
/**
|
|
106
|
+
* Wrap a protobuf message in an Any type envelope
|
|
107
|
+
*
|
|
108
|
+
* Any message format:
|
|
109
|
+
* field 1 (string): type_url
|
|
110
|
+
* field 2 (bytes): value (serialized message)
|
|
111
|
+
*/
|
|
112
|
+
function wrapInAny(typeUrl, message) {
|
|
113
|
+
const typeUrlField = encodeString(1, typeUrl);
|
|
114
|
+
const valueField = encodeBytes(2, message);
|
|
115
|
+
return concat(typeUrlField, valueField);
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Encode CommandStatementQuery message
|
|
119
|
+
*
|
|
120
|
+
* message CommandStatementQuery {
|
|
121
|
+
* string query = 1;
|
|
122
|
+
* optional bytes transaction_id = 2;
|
|
123
|
+
* }
|
|
124
|
+
*/
|
|
125
|
+
export function encodeCommandStatementQuery(query, transactionId) {
|
|
126
|
+
const parts = [encodeString(1, query)];
|
|
127
|
+
if (transactionId && transactionId.length > 0) {
|
|
128
|
+
parts.push(encodeBytes(2, transactionId));
|
|
129
|
+
}
|
|
130
|
+
const message = concat(...parts);
|
|
131
|
+
return wrapInAny(TypeUrls.commandStatementQuery, message);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Encode CommandStatementUpdate message
|
|
135
|
+
*
|
|
136
|
+
* message CommandStatementUpdate {
|
|
137
|
+
* string query = 1;
|
|
138
|
+
* optional bytes transaction_id = 2;
|
|
139
|
+
* }
|
|
140
|
+
*/
|
|
141
|
+
export function encodeCommandStatementUpdate(query, transactionId) {
|
|
142
|
+
const parts = [encodeString(1, query)];
|
|
143
|
+
if (transactionId && transactionId.length > 0) {
|
|
144
|
+
parts.push(encodeBytes(2, transactionId));
|
|
145
|
+
}
|
|
146
|
+
const message = concat(...parts);
|
|
147
|
+
return wrapInAny(TypeUrls.commandStatementUpdate, message);
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Encode CommandPreparedStatementQuery message
|
|
151
|
+
*
|
|
152
|
+
* message CommandPreparedStatementQuery {
|
|
153
|
+
* bytes prepared_statement_handle = 1;
|
|
154
|
+
* }
|
|
155
|
+
*/
|
|
156
|
+
export function encodeCommandPreparedStatementQuery(preparedStatementHandle) {
|
|
157
|
+
const message = encodeBytes(1, preparedStatementHandle);
|
|
158
|
+
return wrapInAny(TypeUrls.commandPreparedStatementQuery, message);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Encode CommandPreparedStatementUpdate message
|
|
162
|
+
*
|
|
163
|
+
* message CommandPreparedStatementUpdate {
|
|
164
|
+
* bytes prepared_statement_handle = 1;
|
|
165
|
+
* }
|
|
166
|
+
*/
|
|
167
|
+
export function encodeCommandPreparedStatementUpdate(preparedStatementHandle) {
|
|
168
|
+
const message = encodeBytes(1, preparedStatementHandle);
|
|
169
|
+
return wrapInAny(TypeUrls.commandPreparedStatementUpdate, message);
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Encode ActionCreatePreparedStatementRequest message
|
|
173
|
+
*
|
|
174
|
+
* message ActionCreatePreparedStatementRequest {
|
|
175
|
+
* string query = 1;
|
|
176
|
+
* optional bytes transaction_id = 2;
|
|
177
|
+
* }
|
|
178
|
+
*/
|
|
179
|
+
export function encodeActionCreatePreparedStatementRequest(query, transactionId) {
|
|
180
|
+
const parts = [encodeString(1, query)];
|
|
181
|
+
if (transactionId && transactionId.length > 0) {
|
|
182
|
+
parts.push(encodeBytes(2, transactionId));
|
|
183
|
+
}
|
|
184
|
+
const message = concat(...parts);
|
|
185
|
+
return wrapInAny(TypeUrls.actionCreatePreparedStatementRequest, message);
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Encode ActionClosePreparedStatementRequest message
|
|
189
|
+
*
|
|
190
|
+
* message ActionClosePreparedStatementRequest {
|
|
191
|
+
* bytes prepared_statement_handle = 1;
|
|
192
|
+
* }
|
|
193
|
+
*/
|
|
194
|
+
export function encodeActionClosePreparedStatementRequest(preparedStatementHandle) {
|
|
195
|
+
const message = encodeBytes(1, preparedStatementHandle);
|
|
196
|
+
return wrapInAny(TypeUrls.actionClosePreparedStatementRequest, message);
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Encode CommandGetCatalogs message (empty message)
|
|
200
|
+
*/
|
|
201
|
+
export function encodeCommandGetCatalogs() {
|
|
202
|
+
return wrapInAny(TypeUrls.commandGetCatalogs, new Uint8Array());
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Encode CommandGetDbSchemas message
|
|
206
|
+
*
|
|
207
|
+
* message CommandGetDbSchemas {
|
|
208
|
+
* optional string catalog = 1;
|
|
209
|
+
* optional string db_schema_filter_pattern = 2;
|
|
210
|
+
* }
|
|
211
|
+
*/
|
|
212
|
+
export function encodeCommandGetDbSchemas(catalog, dbSchemaFilterPattern) {
|
|
213
|
+
const parts = [];
|
|
214
|
+
if (catalog !== undefined) {
|
|
215
|
+
parts.push(encodeString(1, catalog));
|
|
216
|
+
}
|
|
217
|
+
if (dbSchemaFilterPattern !== undefined) {
|
|
218
|
+
parts.push(encodeString(2, dbSchemaFilterPattern));
|
|
219
|
+
}
|
|
220
|
+
const message = concat(...parts);
|
|
221
|
+
return wrapInAny(TypeUrls.commandGetDbSchemas, message);
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Encode CommandGetTables message
|
|
225
|
+
*
|
|
226
|
+
* message CommandGetTables {
|
|
227
|
+
* optional string catalog = 1;
|
|
228
|
+
* optional string db_schema_filter_pattern = 2;
|
|
229
|
+
* optional string table_name_filter_pattern = 3;
|
|
230
|
+
* repeated string table_types = 4;
|
|
231
|
+
* bool include_schema = 5;
|
|
232
|
+
* }
|
|
233
|
+
*/
|
|
234
|
+
export function encodeCommandGetTables(options) {
|
|
235
|
+
const parts = [];
|
|
236
|
+
if (options.catalog !== undefined) {
|
|
237
|
+
parts.push(encodeString(1, options.catalog));
|
|
238
|
+
}
|
|
239
|
+
if (options.dbSchemaFilterPattern !== undefined) {
|
|
240
|
+
parts.push(encodeString(2, options.dbSchemaFilterPattern));
|
|
241
|
+
}
|
|
242
|
+
if (options.tableNameFilterPattern !== undefined) {
|
|
243
|
+
parts.push(encodeString(3, options.tableNameFilterPattern));
|
|
244
|
+
}
|
|
245
|
+
if (options.tableTypes) {
|
|
246
|
+
for (const tableType of options.tableTypes) {
|
|
247
|
+
parts.push(encodeString(4, tableType));
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
if (options.includeSchema) {
|
|
251
|
+
// Boolean true encoded as varint 1
|
|
252
|
+
parts.push(concat(encodeTag(5, wireType.varint), encodeVarint(1)));
|
|
253
|
+
}
|
|
254
|
+
const message = concat(...parts);
|
|
255
|
+
return wrapInAny(TypeUrls.commandGetTables, message);
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Encode CommandGetTableTypes message (empty message)
|
|
259
|
+
*/
|
|
260
|
+
export function encodeCommandGetTableTypes() {
|
|
261
|
+
return wrapInAny(TypeUrls.commandGetTableTypes, new Uint8Array());
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Encode CommandGetPrimaryKeys message
|
|
265
|
+
*
|
|
266
|
+
* message CommandGetPrimaryKeys {
|
|
267
|
+
* optional string catalog = 1;
|
|
268
|
+
* optional string db_schema = 2;
|
|
269
|
+
* string table = 3;
|
|
270
|
+
* }
|
|
271
|
+
*/
|
|
272
|
+
export function encodeCommandGetPrimaryKeys(table, catalog, dbSchema) {
|
|
273
|
+
const parts = [];
|
|
274
|
+
if (catalog !== undefined) {
|
|
275
|
+
parts.push(encodeString(1, catalog));
|
|
276
|
+
}
|
|
277
|
+
if (dbSchema !== undefined) {
|
|
278
|
+
parts.push(encodeString(2, dbSchema));
|
|
279
|
+
}
|
|
280
|
+
parts.push(encodeString(3, table));
|
|
281
|
+
const message = concat(...parts);
|
|
282
|
+
return wrapInAny(TypeUrls.commandGetPrimaryKeys, message);
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Encode CommandGetExportedKeys message
|
|
286
|
+
*
|
|
287
|
+
* message CommandGetExportedKeys {
|
|
288
|
+
* optional string catalog = 1;
|
|
289
|
+
* optional string db_schema = 2;
|
|
290
|
+
* string table = 3;
|
|
291
|
+
* }
|
|
292
|
+
*/
|
|
293
|
+
export function encodeCommandGetExportedKeys(table, catalog, dbSchema) {
|
|
294
|
+
const parts = [];
|
|
295
|
+
if (catalog !== undefined) {
|
|
296
|
+
parts.push(encodeString(1, catalog));
|
|
297
|
+
}
|
|
298
|
+
if (dbSchema !== undefined) {
|
|
299
|
+
parts.push(encodeString(2, dbSchema));
|
|
300
|
+
}
|
|
301
|
+
parts.push(encodeString(3, table));
|
|
302
|
+
const message = concat(...parts);
|
|
303
|
+
return wrapInAny(TypeUrls.commandGetExportedKeys, message);
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Encode CommandGetImportedKeys message
|
|
307
|
+
*
|
|
308
|
+
* message CommandGetImportedKeys {
|
|
309
|
+
* optional string catalog = 1;
|
|
310
|
+
* optional string db_schema = 2;
|
|
311
|
+
* string table = 3;
|
|
312
|
+
* }
|
|
313
|
+
*/
|
|
314
|
+
export function encodeCommandGetImportedKeys(table, catalog, dbSchema) {
|
|
315
|
+
const parts = [];
|
|
316
|
+
if (catalog !== undefined) {
|
|
317
|
+
parts.push(encodeString(1, catalog));
|
|
318
|
+
}
|
|
319
|
+
if (dbSchema !== undefined) {
|
|
320
|
+
parts.push(encodeString(2, dbSchema));
|
|
321
|
+
}
|
|
322
|
+
parts.push(encodeString(3, table));
|
|
323
|
+
const message = concat(...parts);
|
|
324
|
+
return wrapInAny(TypeUrls.commandGetImportedKeys, message);
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Decode varint from buffer at offset, returns [value, bytesRead]
|
|
328
|
+
*/
|
|
329
|
+
function decodeVarint(buffer, offset) {
|
|
330
|
+
let result = 0;
|
|
331
|
+
let shift = 0;
|
|
332
|
+
let bytesRead = 0;
|
|
333
|
+
while (offset + bytesRead < buffer.length) {
|
|
334
|
+
const byte = buffer[offset + bytesRead];
|
|
335
|
+
result |= (byte & 0x7f) << shift;
|
|
336
|
+
bytesRead++;
|
|
337
|
+
if ((byte & 0x80) === 0) {
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
shift += 7;
|
|
341
|
+
}
|
|
342
|
+
return [result >>> 0, bytesRead];
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Parse protobuf fields from a buffer
|
|
346
|
+
*/
|
|
347
|
+
export function parseProtoFields(buffer) {
|
|
348
|
+
const fields = [];
|
|
349
|
+
let offset = 0;
|
|
350
|
+
while (offset < buffer.length) {
|
|
351
|
+
const [tag, tagBytes] = decodeVarint(buffer, offset);
|
|
352
|
+
offset += tagBytes;
|
|
353
|
+
const fieldNumber = tag >>> 3;
|
|
354
|
+
const wt = tag & 0x7;
|
|
355
|
+
let value;
|
|
356
|
+
switch (wt) {
|
|
357
|
+
case wireType.varint: {
|
|
358
|
+
const [v, vBytes] = decodeVarint(buffer, offset);
|
|
359
|
+
offset += vBytes;
|
|
360
|
+
value = v;
|
|
361
|
+
break;
|
|
362
|
+
}
|
|
363
|
+
case wireType.fixed64: {
|
|
364
|
+
value = buffer.slice(offset, offset + 8);
|
|
365
|
+
offset += 8;
|
|
366
|
+
break;
|
|
367
|
+
}
|
|
368
|
+
case wireType.lengthDelimited: {
|
|
369
|
+
const [length, lenBytes] = decodeVarint(buffer, offset);
|
|
370
|
+
offset += lenBytes;
|
|
371
|
+
value = buffer.slice(offset, offset + length);
|
|
372
|
+
offset += length;
|
|
373
|
+
break;
|
|
374
|
+
}
|
|
375
|
+
case wireType.fixed32: {
|
|
376
|
+
value = buffer.slice(offset, offset + 4);
|
|
377
|
+
offset += 4;
|
|
378
|
+
break;
|
|
379
|
+
}
|
|
380
|
+
default:
|
|
381
|
+
throw new Error(`Unknown wire type: ${String(wt)}`);
|
|
382
|
+
}
|
|
383
|
+
fields.push({ fieldNumber, wireType: wt, value });
|
|
384
|
+
}
|
|
385
|
+
return fields;
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Get a string field from parsed proto fields
|
|
389
|
+
*/
|
|
390
|
+
export function getStringField(fields, fieldNumber) {
|
|
391
|
+
const field = fields.find((f) => f.fieldNumber === fieldNumber);
|
|
392
|
+
if (field && field.value instanceof Uint8Array) {
|
|
393
|
+
return new TextDecoder().decode(field.value);
|
|
394
|
+
}
|
|
395
|
+
return undefined;
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Get a bytes field from parsed proto fields
|
|
399
|
+
*/
|
|
400
|
+
export function getBytesField(fields, fieldNumber) {
|
|
401
|
+
const field = fields.find((f) => f.fieldNumber === fieldNumber);
|
|
402
|
+
if (field && field.value instanceof Uint8Array) {
|
|
403
|
+
return field.value;
|
|
404
|
+
}
|
|
405
|
+
return undefined;
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Get a number field from parsed proto fields
|
|
409
|
+
*/
|
|
410
|
+
export function getNumberField(fields, fieldNumber) {
|
|
411
|
+
const field = fields.find((f) => f.fieldNumber === fieldNumber);
|
|
412
|
+
if (field && typeof field.value === "number") {
|
|
413
|
+
return field.value;
|
|
414
|
+
}
|
|
415
|
+
return undefined;
|
|
416
|
+
}
|
|
417
|
+
//# sourceMappingURL=proto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proto.js","sourceRoot":"","sources":["../src/proto.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,+EAA+E;AAC/E,oCAAoC;AACpC,+EAA+E;AAE/E,MAAM,aAAa,GAAG,gDAAgD,CAAA;AAEtE,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,qBAAqB,EAAE,GAAG,aAAa,uBAAuB;IAC9D,sBAAsB,EAAE,GAAG,aAAa,wBAAwB;IAChE,6BAA6B,EAAE,GAAG,aAAa,+BAA+B;IAC9E,8BAA8B,EAAE,GAAG,aAAa,gCAAgC;IAChF,kBAAkB,EAAE,GAAG,aAAa,oBAAoB;IACxD,mBAAmB,EAAE,GAAG,aAAa,qBAAqB;IAC1D,gBAAgB,EAAE,GAAG,aAAa,kBAAkB;IACpD,oBAAoB,EAAE,GAAG,aAAa,sBAAsB;IAC5D,qBAAqB,EAAE,GAAG,aAAa,uBAAuB;IAC9D,sBAAsB,EAAE,GAAG,aAAa,wBAAwB;IAChE,sBAAsB,EAAE,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CAAC,CAAA;IAC/D,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,YAAY,UAAU,EAAE,CAAC;QAC/C,OAAO,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IAC9C,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,MAAoB,EAAE,WAAmB;IACrE,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,KAAK,WAAW,CAAC,CAAA;IAC/D,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,YAAY,UAAU,EAAE,CAAC;QAC/C,OAAO,KAAK,CAAC,KAAK,CAAA;IACpB,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,MAAoB,EAAE,WAAmB;IACtE,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,KAAK,WAAW,CAAC,CAAA;IAC/D,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC7C,OAAO,KAAK,CAAC,KAAK,CAAA;IACpB,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=query-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-builder.d.ts","sourceRoot":"","sources":["../src/query-builder.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-builder.js","sourceRoot":"","sources":["../src/query-builder.ts"],"names":[],"mappings":";AAAA,OAAO"}
|