@query-farm/vgi 0.29.1 → 0.31.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/README.md +1 -1
- package/dist/client-entry.js +20 -5
- package/dist/client-entry.js.map +5 -5
- package/dist/generated/vgi-client.d.ts +1 -4
- package/dist/index.js +24 -11
- package/dist/index.js.map +8 -8
- package/dist/protocol/dispatch.d.ts +26 -0
- package/dist/serve-entry.js +9 -8
- package/dist/serve-entry.js.map +7 -7
- package/dist/worker-cf-entry.js +10 -12
- package/dist/worker-cf-entry.js.map +8 -8
- package/package.json +5 -4
- package/src/catalog/read-only.ts +1 -4
- package/src/client/errors.ts +19 -0
- package/src/generated/vgi-client.ts +2 -5
- package/src/generated/vgi-protocol-schemas.ts +2 -5
- package/src/http/client-bundle.ts +1 -1
- package/src/http/fetch.ts +10 -3
- package/src/protocol/dispatch.ts +28 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@query-farm/vgi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "TypeScript framework for extending DuckDB with user-defined functions via the Vector Gateway Interface (VGI) over Arrow IPC.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Query Farm LLC (https://query.farm)",
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
"./src/index.ts",
|
|
35
35
|
"./src/client-entry.ts",
|
|
36
36
|
"./src/worker-cf-entry.ts",
|
|
37
|
-
"./src/serve-entry.ts"
|
|
37
|
+
"./src/serve-entry.ts",
|
|
38
|
+
"./src/arrow/impl-flechette/compat.ts"
|
|
38
39
|
],
|
|
39
40
|
"main": "dist/index.js",
|
|
40
41
|
"types": "dist/index.d.ts",
|
|
@@ -90,12 +91,12 @@
|
|
|
90
91
|
},
|
|
91
92
|
"peerDependencies": {
|
|
92
93
|
"@query-farm/apache-arrow": "^21.1.1",
|
|
93
|
-
"@query-farm/vgi-rpc": ">=0.
|
|
94
|
+
"@query-farm/vgi-rpc": ">=0.24.0 <0.25.0"
|
|
94
95
|
},
|
|
95
96
|
"devDependencies": {
|
|
96
97
|
"@duckdb/node-api": "^1.5.5-r.4",
|
|
97
98
|
"@query-farm/apache-arrow": "^21.1.1",
|
|
98
|
-
"@query-farm/vgi-rpc": "^0.
|
|
99
|
+
"@query-farm/vgi-rpc": "^0.24.0",
|
|
99
100
|
"@types/bun": "latest",
|
|
100
101
|
"typescript": "^7.0.2"
|
|
101
102
|
},
|
package/src/catalog/read-only.ts
CHANGED
|
@@ -343,10 +343,7 @@ export class ReadOnlyCatalogInterface extends CatalogInterface {
|
|
|
343
343
|
check_constraints: t.check ?? [],
|
|
344
344
|
primary_key_constraints: pkIndices,
|
|
345
345
|
foreign_key_constraints: fkBytes,
|
|
346
|
-
|
|
347
|
-
supports_update: false,
|
|
348
|
-
supports_delete: false,
|
|
349
|
-
supports_returning: false,
|
|
346
|
+
write_result_modes: {},
|
|
350
347
|
supports_column_statistics: t.statistics != null && Object.keys(t.statistics).length > 0,
|
|
351
348
|
// Inline scan_function only for purely function-backed tables.
|
|
352
349
|
// When explicit `columns` are also declared, the table is on the
|
package/src/client/errors.ts
CHANGED
|
@@ -63,6 +63,25 @@ export function wrapRpcWithErrorEnrichment(rpc: RpcClient): RpcClient {
|
|
|
63
63
|
throw e;
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
|
+
// The batch-level twins (vgi-rpc 0.24.0) get the same treatment: a caller
|
|
67
|
+
// holding encoded Arrow should still see the worker's traceback rather
|
|
68
|
+
// than a bare RpcError.
|
|
69
|
+
async callRaw(method, input) {
|
|
70
|
+
try {
|
|
71
|
+
return await rpc.callRaw(method, input);
|
|
72
|
+
} catch (e) {
|
|
73
|
+
if (e instanceof RpcError) throw VgiClientError.fromRpcError(e);
|
|
74
|
+
throw e;
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
async streamRaw(method, input, options) {
|
|
78
|
+
try {
|
|
79
|
+
return await rpc.streamRaw(method, input, options);
|
|
80
|
+
} catch (e) {
|
|
81
|
+
if (e instanceof RpcError) throw VgiClientError.fromRpcError(e);
|
|
82
|
+
throw e;
|
|
83
|
+
}
|
|
84
|
+
},
|
|
66
85
|
describe: () => rpc.describe(),
|
|
67
86
|
close: () => rpc.close(),
|
|
68
87
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// GENERATED by vgi.codegen.ts_client. DO NOT EDIT BY HAND.
|
|
3
3
|
//
|
|
4
4
|
// Generator: vgi-gen-ts-client v1
|
|
5
|
-
// Content hash:
|
|
5
|
+
// Content hash: 69731fc31f09
|
|
6
6
|
//
|
|
7
7
|
// To regenerate:
|
|
8
8
|
// uv run --project ~/Development/vgi-python vgi-gen-ts-client \
|
|
@@ -72,10 +72,7 @@ export interface TableInfo {
|
|
|
72
72
|
check_constraints: string[];
|
|
73
73
|
primary_key_constraints: number[][];
|
|
74
74
|
foreign_key_constraints: Uint8Array[];
|
|
75
|
-
|
|
76
|
-
supports_update: boolean;
|
|
77
|
-
supports_delete: boolean;
|
|
78
|
-
supports_returning: boolean;
|
|
75
|
+
write_result_modes: Record<string, string>;
|
|
79
76
|
supports_column_statistics: boolean;
|
|
80
77
|
scan_function?: Uint8Array | null;
|
|
81
78
|
insert_function?: Uint8Array | null;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// GENERATED by vgi.codegen.ts_schemas. DO NOT EDIT BY HAND.
|
|
3
3
|
//
|
|
4
4
|
// Generator: vgi-gen-ts-schemas v2
|
|
5
|
-
// Content hash:
|
|
5
|
+
// Content hash: 668f198950df
|
|
6
6
|
//
|
|
7
7
|
// To regenerate:
|
|
8
8
|
// uv run --project ~/Development/vgi-python vgi-gen-ts-schemas \
|
|
@@ -60,10 +60,7 @@ export const TableInfoSchema = schema([
|
|
|
60
60
|
field("check_constraints", list(field("item", utf8(), true)), false),
|
|
61
61
|
field("primary_key_constraints", list(field("item", list(field("item", int32(), true)), true)), false),
|
|
62
62
|
field("foreign_key_constraints", list(field("item", binary(), true)), false),
|
|
63
|
-
field("
|
|
64
|
-
field("supports_update", bool(), false),
|
|
65
|
-
field("supports_delete", bool(), false),
|
|
66
|
-
field("supports_returning", bool(), false),
|
|
63
|
+
field("write_result_modes", map(field("key", utf8(), false), field("value", utf8(), true), false), false),
|
|
67
64
|
field("supports_column_statistics", bool(), false),
|
|
68
65
|
field("scan_function", binary(), true),
|
|
69
66
|
field("insert_function", binary(), true),
|