@query-farm/vgi 0.28.0 → 0.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -8
- package/dist/arguments/argument-spec.d.ts +57 -2
- package/dist/arrow/impl-arrowjs/index.d.ts +1 -1
- package/dist/arrow/impl-arrowjs/iterate.d.ts +10 -1
- package/dist/arrow/impl-arrowjs/schema.d.ts +2 -0
- package/dist/arrow/impl-flechette/index.d.ts +1 -1
- package/dist/arrow/impl-flechette/iterate.d.ts +10 -1
- package/dist/arrow/impl-flechette/schema.d.ts +2 -0
- package/dist/arrow/index.d.ts +1 -1
- package/dist/arrow/schema-types.d.ts +3 -1
- package/dist/arrow/types.d.ts +39 -3
- package/dist/catalog/composite.d.ts +13 -13
- package/dist/catalog/descriptors.d.ts +7 -3
- package/dist/catalog/interface.d.ts +108 -38
- package/dist/catalog/read-only.d.ts +32 -15
- package/dist/client/client.d.ts +37 -30
- package/dist/client/types.d.ts +2 -0
- package/dist/client-entry.d.ts +1 -1
- package/dist/client-entry.js +791 -447
- package/dist/client-entry.js.map +18 -17
- package/dist/filter-pushdown/capabilities.d.ts +3 -0
- package/dist/filter-pushdown/deserialize.d.ts +14 -15
- package/dist/filter-pushdown/evaluate.d.ts +14 -44
- package/dist/filter-pushdown/index.d.ts +2 -2
- package/dist/filter-pushdown/types.d.ts +120 -68
- package/dist/functions/aggregate.d.ts +4 -0
- package/dist/functions/registry.d.ts +5 -5
- package/dist/functions/scalar.d.ts +6 -1
- package/dist/functions/table-buffering.d.ts +9 -0
- package/dist/functions/table-in-out.d.ts +13 -0
- package/dist/functions/table.d.ts +72 -2
- package/dist/functions/types.d.ts +60 -2
- package/dist/generated/vgi-client.d.ts +114 -26
- package/dist/generated/vgi-protocol-schemas.d.ts +34 -0
- package/dist/http/fetch.d.ts +16 -0
- package/dist/index.core.d.ts +4 -3
- package/dist/index.js +3396 -2064
- package/dist/index.js.map +55 -49
- package/dist/metadata/types.d.ts +15 -2
- package/dist/protocol/handlers/catalog/shared.d.ts +0 -8
- package/dist/protocol/handlers/function.d.ts +11 -0
- package/dist/protocol/handlers/shared.d.ts +3 -1
- package/dist/protocol/serializers/bind.d.ts +1 -2
- package/dist/protocol/serializers/cardinality.d.ts +1 -2
- package/dist/protocol/serializers/splits.d.ts +126 -0
- package/dist/protocol/types.d.ts +36 -3
- package/dist/request-auth.d.ts +28 -0
- package/dist/schema-path.d.ts +7 -0
- package/dist/serve-entry.d.ts +25 -0
- package/dist/serve-entry.js +1129 -569
- package/dist/serve-entry.js.map +36 -32
- package/dist/split-token.d.ts +88 -0
- package/dist/types.d.ts +8 -0
- package/dist/worker-cf-entry.js +2928 -1689
- package/dist/worker-cf-entry.js.map +51 -44
- package/dist/worker.d.ts +1 -1
- package/package.json +3 -3
- package/src/arguments/argument-spec.ts +93 -4
- package/src/arguments/arguments.ts +0 -1
- package/src/arrow/impl-arrowjs/index.ts +1 -1
- package/src/arrow/impl-arrowjs/iterate.ts +21 -0
- package/src/arrow/impl-arrowjs/schema.ts +4 -0
- package/src/arrow/impl-flechette/index.ts +1 -1
- package/src/arrow/impl-flechette/iterate.ts +24 -1
- package/src/arrow/impl-flechette/schema.ts +4 -0
- package/src/arrow/index.ts +1 -1
- package/src/arrow/schema-types.ts +4 -0
- package/src/arrow/types.ts +39 -3
- package/src/catalog/composite.ts +26 -26
- package/src/catalog/descriptors.ts +12 -3
- package/src/catalog/interface.ts +217 -72
- package/src/catalog/read-only.ts +141 -84
- package/src/client/client.ts +97 -73
- package/src/client/types.ts +2 -0
- package/src/client-entry.ts +2 -1
- package/src/filter-pushdown/capabilities.ts +13 -0
- package/src/filter-pushdown/collector.ts +22 -35
- package/src/filter-pushdown/deserialize.ts +657 -221
- package/src/filter-pushdown/evaluate.ts +410 -499
- package/src/filter-pushdown/index.ts +16 -2
- package/src/filter-pushdown/types.ts +88 -71
- package/src/functions/aggregate.ts +12 -1
- package/src/functions/copy-from.ts +2 -1
- package/src/functions/copy-to.ts +2 -1
- package/src/functions/registry.ts +24 -22
- package/src/functions/scalar.ts +37 -0
- package/src/functions/table-buffering.ts +48 -6
- package/src/functions/table-in-out.ts +194 -33
- package/src/functions/table.ts +187 -22
- package/src/functions/types.ts +64 -1
- package/src/generated/vgi-client.ts +122 -28
- package/src/generated/vgi-protocol-schemas.ts +455 -58
- package/src/http/fetch.ts +129 -2
- package/src/index.core.ts +4 -2
- package/src/metadata/resolve.ts +43 -1
- package/src/metadata/serialize.ts +43 -5
- package/src/metadata/types.ts +17 -1
- package/src/protocol/dispatch.ts +1 -1
- package/src/protocol/handlers/aggregate.ts +23 -12
- package/src/protocol/handlers/catalog/admin.ts +47 -54
- package/src/protocol/handlers/catalog/index_methods.ts +6 -13
- package/src/protocol/handlers/catalog/macro.ts +12 -20
- package/src/protocol/handlers/catalog/shared.ts +12 -57
- package/src/protocol/handlers/catalog/table.ts +49 -112
- package/src/protocol/handlers/catalog/view.ts +18 -22
- package/src/protocol/handlers/function.ts +311 -18
- package/src/protocol/handlers/shared.ts +12 -3
- package/src/protocol/handlers/table-buffering.ts +11 -8
- package/src/protocol/serializers/bind.ts +69 -67
- package/src/protocol/serializers/cardinality.ts +7 -7
- package/src/protocol/serializers/init.ts +52 -10
- package/src/protocol/serializers/splits.ts +221 -0
- package/src/protocol/state-serializer.ts +55 -1
- package/src/protocol/types.ts +36 -3
- package/src/request-auth.ts +73 -0
- package/src/schema-path.ts +25 -0
- package/src/serve-entry.ts +69 -2
- package/src/split-token.ts +297 -0
- package/src/types.ts +9 -0
- package/src/worker-cf-entry.ts +2 -1
- package/src/worker.ts +79 -14
|
@@ -95,14 +95,42 @@ export interface ScanFunctionResult {
|
|
|
95
95
|
namedArguments: Record<string, unknown>;
|
|
96
96
|
/** DuckDB extensions to load before calling the function. */
|
|
97
97
|
requiredExtensions: string[];
|
|
98
|
+
/**
|
|
99
|
+
* Catalog schema path `functionName` is registered in (protocol 2.0.0). A function
|
|
100
|
+
* name is unique only within a schema, so a client that doesn't know this
|
|
101
|
+
* cannot tell which implementation a colliding name refers to — set it
|
|
102
|
+
* whenever the resolving code already knows the schema. `null` for a
|
|
103
|
+
* pre-1.5.0 peer, or when the resolved function is a native DuckDB function
|
|
104
|
+
* with no VGI-side schema of its own (e.g. `read_parquet`).
|
|
105
|
+
*/
|
|
106
|
+
schemaPath: string[] | null;
|
|
98
107
|
}
|
|
108
|
+
/**
|
|
109
|
+
* Encode a ScanFunctionResult wire record — the single-row batch shape
|
|
110
|
+
* `{ function_name, arguments, required_extensions, schema_path }` that
|
|
111
|
+
* `catalog_table_scan_function_get` returns and that a function-backed table
|
|
112
|
+
* inlines into `TableInfo.scan_function`.
|
|
113
|
+
*
|
|
114
|
+
* It exists so there is exactly one place that names those columns. The
|
|
115
|
+
* inline-scan path used to restate the schema locally even though codegen
|
|
116
|
+
* emits it; a hand-written wire schema is how four SDKs ended up disagreeing
|
|
117
|
+
* about which columns were binary and which were large_binary.
|
|
118
|
+
*
|
|
119
|
+
* `argumentsBytes` is the already-serialized inner arguments batch (one column
|
|
120
|
+
* per argument: `arg_<index>` positional, bare name for named).
|
|
121
|
+
*
|
|
122
|
+
* `schemaPath` (protocol 2.0.0) identifies the schema that registers `functionName`;
|
|
123
|
+
* leave it null when the caller has no VGI-side schema to report.
|
|
124
|
+
*/
|
|
125
|
+
export declare function encodeScanFunctionResult(functionName: string, argumentsBytes: Uint8Array, requiredExtensions?: string[], schemaPath?: string[] | null): Uint8Array;
|
|
99
126
|
/**
|
|
100
127
|
* Decode a ScanFunctionResult from a wire-shape inner result dict.
|
|
101
128
|
*
|
|
102
129
|
* The wire shape (per ScanFunctionResultSchema) is
|
|
103
|
-
* `{ function_name: utf8, arguments: binary, required_extensions: list<utf8
|
|
104
|
-
* where `arguments` is a serialized single-row batch
|
|
105
|
-
* argument: `arg_<index>` for positional args, the bare
|
|
130
|
+
* `{ function_name: utf8, arguments: binary, required_extensions: list<utf8>,
|
|
131
|
+
* schema_path: list<utf8>? }`, where `arguments` is a serialized single-row batch
|
|
132
|
+
* with one column per argument: `arg_<index>` for positional args, the bare
|
|
133
|
+
* name for named args.
|
|
106
134
|
*/
|
|
107
135
|
export declare function decodeScanFunctionResult(inner: Record<string, unknown>): ScanFunctionResult;
|
|
108
136
|
/**
|
|
@@ -119,6 +147,7 @@ export declare function singleBranchResult(legacy: {
|
|
|
119
147
|
function_name: string;
|
|
120
148
|
arguments: unknown;
|
|
121
149
|
required_extensions?: string[];
|
|
150
|
+
schema_path?: string[] | null;
|
|
122
151
|
}): {
|
|
123
152
|
branches: Uint8Array[];
|
|
124
153
|
required_extensions: string[];
|
|
@@ -149,16 +178,57 @@ export interface ScanBranchInput {
|
|
|
149
178
|
branchFilter?: string | null;
|
|
150
179
|
/** Declares this branch as the INSERT target (at most one per table). */
|
|
151
180
|
writable?: boolean;
|
|
181
|
+
/** Custom file FORMAT this branch reads, for a format-backed branch. */
|
|
182
|
+
formatName?: string | null;
|
|
183
|
+
/** Locations the format branch reads. */
|
|
184
|
+
formatLocations?: string[] | null;
|
|
185
|
+
/** Reader options for a format branch, as a 1-row IPC batch whose COLUMN
|
|
186
|
+
* NAMES are the option names — the same shape `arguments` uses, because an
|
|
187
|
+
* option value may be any Arrow type. These BECOME the reader's named
|
|
188
|
+
* arguments, so without them a format branch cannot pass its reader a
|
|
189
|
+
* delimiter, a header flag, or anything else. */
|
|
190
|
+
formatOptions?: Uint8Array | null;
|
|
152
191
|
/**
|
|
153
192
|
* Catalog-table branch (lakehouse federation): leave `functionName` empty and
|
|
154
193
|
* set these to scan the base table
|
|
155
|
-
* `sourceCatalog.
|
|
194
|
+
* `sourceCatalog.sourceSchemaPath.sourceTable` in a companion catalog instead of
|
|
156
195
|
* calling a table function.
|
|
157
196
|
*/
|
|
158
197
|
sourceCatalog?: string | null;
|
|
159
|
-
|
|
198
|
+
sourceSchemaPath?: string[] | null;
|
|
160
199
|
sourceTable?: string | null;
|
|
200
|
+
/**
|
|
201
|
+
* Function branch only — the catalog schema that registers `functionName`
|
|
202
|
+
* (protocol 2.0.0). Without it a client has to guess (the table's own
|
|
203
|
+
* schema, then the catalog's default schema) which implementation
|
|
204
|
+
* `functionName` refers to when the same name is registered in more than
|
|
205
|
+
* one schema. Leave unset for a catalog-table or FORMAT branch, and for a
|
|
206
|
+
* branch that delegates straight to a native DuckDB function
|
|
207
|
+
* (`read_parquet`, `read_csv_auto`, `iceberg_scan`, …) — neither has a
|
|
208
|
+
* VGI-side schema of its own to report, which is why the field is optional
|
|
209
|
+
* rather than required. Not to be confused with `sourceSchemaPath` above, which
|
|
210
|
+
* names a catalog-table branch's *source table's* schema.
|
|
211
|
+
*/
|
|
212
|
+
schemaPath?: string[] | null;
|
|
161
213
|
}
|
|
214
|
+
/**
|
|
215
|
+
* Serialize a single branch's arguments to the nested-IPC form `ScanBranch`
|
|
216
|
+
* expects: a 1-row batch with one column per argument — `arg_<index>` for
|
|
217
|
+
* positional args, the bare name for named args. Mirrors Python's
|
|
218
|
+
* `ScanBranch.to_row_dict` argument handling.
|
|
219
|
+
*/
|
|
220
|
+
/**
|
|
221
|
+
* Encode a format branch's reader options.
|
|
222
|
+
*
|
|
223
|
+
* Same shape as a branch's `arguments` blob — a 1-row batch whose COLUMN NAMES
|
|
224
|
+
* are the option names — because an option value may be any Arrow type, so no
|
|
225
|
+
* static schema could describe the map. Exported because a worker building a
|
|
226
|
+
* format branch needs it and has no other way to produce those bytes.
|
|
227
|
+
*/
|
|
228
|
+
export declare function encodeFormatOptions(options: Record<string, {
|
|
229
|
+
value: unknown;
|
|
230
|
+
type: VgiDataType;
|
|
231
|
+
}>): Uint8Array;
|
|
162
232
|
/**
|
|
163
233
|
* Build a multi-branch `ScanBranchesResult` wire dict from explicit branch
|
|
164
234
|
* definitions. Each branch becomes its own 1-row `ScanBranchSchema` IPC
|
|
@@ -213,23 +283,23 @@ export declare abstract class CatalogInterface {
|
|
|
213
283
|
abstract schemas(attachOpaqueData: AttachOpaqueData, transactionOpaqueData?: TransactionOpaqueData): Awaitable<SchemaInfo[]>;
|
|
214
284
|
create(name: string, onConflict: string, options?: any): Awaitable<void>;
|
|
215
285
|
drop(name: string): Awaitable<void>;
|
|
216
|
-
schemaGet(attachOpaqueData: AttachOpaqueData,
|
|
217
|
-
schemaCreate(attachOpaqueData: AttachOpaqueData,
|
|
218
|
-
schemaDrop(attachOpaqueData: AttachOpaqueData,
|
|
219
|
-
schemaContentsTables(attachOpaqueData: AttachOpaqueData,
|
|
220
|
-
schemaContentsViews(attachOpaqueData: AttachOpaqueData,
|
|
221
|
-
schemaContentsFunctions(attachOpaqueData: AttachOpaqueData,
|
|
222
|
-
tableGet(attachOpaqueData: AttachOpaqueData,
|
|
223
|
-
tableCreate(attachOpaqueData: AttachOpaqueData,
|
|
224
|
-
tableDrop(attachOpaqueData: AttachOpaqueData,
|
|
225
|
-
tableScanFunctionGet(attachOpaqueData: AttachOpaqueData,
|
|
286
|
+
schemaGet(attachOpaqueData: AttachOpaqueData, path: string[], transactionOpaqueData?: TransactionOpaqueData): Awaitable<SchemaInfo | null>;
|
|
287
|
+
schemaCreate(attachOpaqueData: AttachOpaqueData, path: string[], comment?: string | null, tags?: any, transactionOpaqueData?: TransactionOpaqueData): Awaitable<void>;
|
|
288
|
+
schemaDrop(attachOpaqueData: AttachOpaqueData, path: string[], ignoreNotFound?: boolean, cascade?: boolean, transactionOpaqueData?: TransactionOpaqueData): Awaitable<void>;
|
|
289
|
+
schemaContentsTables(attachOpaqueData: AttachOpaqueData, path: string[], transactionOpaqueData?: TransactionOpaqueData): Awaitable<TableInfo[]>;
|
|
290
|
+
schemaContentsViews(attachOpaqueData: AttachOpaqueData, path: string[], transactionOpaqueData?: TransactionOpaqueData): Awaitable<ViewInfo[]>;
|
|
291
|
+
schemaContentsFunctions(attachOpaqueData: AttachOpaqueData, path: string[], type: string, transactionOpaqueData?: TransactionOpaqueData): Awaitable<FunctionInfo[]>;
|
|
292
|
+
tableGet(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, atUnit?: string, atValue?: string, transactionOpaqueData?: TransactionOpaqueData): Awaitable<TableInfo | null>;
|
|
293
|
+
tableCreate(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, columns: Uint8Array, onConflict: string, notNullConstraints?: number[], uniqueConstraints?: number[][], checkConstraints?: string[], transactionOpaqueData?: TransactionOpaqueData): Awaitable<void>;
|
|
294
|
+
tableDrop(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Awaitable<void>;
|
|
295
|
+
tableScanFunctionGet(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, atUnit?: string, atValue?: string, transactionOpaqueData?: TransactionOpaqueData): Awaitable<any>;
|
|
226
296
|
/**
|
|
227
297
|
* Return the scan branches for a (possibly multi-source) table. Default
|
|
228
298
|
* delegates to `tableScanFunctionGet` and wraps the single result as a
|
|
229
299
|
* one-branch list, so every single-source catalog is compatible with the
|
|
230
300
|
* branches-aware C++ extension. Override for genuine multi-source tables.
|
|
231
301
|
*/
|
|
232
|
-
tableScanBranchesGet(attachOpaqueData: AttachOpaqueData,
|
|
302
|
+
tableScanBranchesGet(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, atUnit?: string, atValue?: string, transactionOpaqueData?: TransactionOpaqueData): Awaitable<any>;
|
|
233
303
|
/**
|
|
234
304
|
* Return serialized column statistics for a table, or null if none are
|
|
235
305
|
* available. The result is the IPC bytes of a ColumnStatistics RecordBatch
|
|
@@ -238,27 +308,27 @@ export declare abstract class CatalogInterface {
|
|
|
238
308
|
* descriptor. Returning null signals "no stats" so DuckDB falls back to
|
|
239
309
|
* the function-level `table_function_statistics` path.
|
|
240
310
|
*/
|
|
241
|
-
tableColumnStatisticsGet(attachOpaqueData: AttachOpaqueData,
|
|
311
|
+
tableColumnStatisticsGet(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, transactionOpaqueData?: TransactionOpaqueData): Awaitable<{
|
|
242
312
|
bytes: Uint8Array;
|
|
243
313
|
cacheMaxAgeSeconds: number | null;
|
|
244
314
|
} | null>;
|
|
245
|
-
tableCommentSet(attachOpaqueData: AttachOpaqueData,
|
|
246
|
-
tableRename(attachOpaqueData: AttachOpaqueData,
|
|
247
|
-
tableColumnAdd(attachOpaqueData: AttachOpaqueData,
|
|
248
|
-
tableColumnDrop(attachOpaqueData: AttachOpaqueData,
|
|
249
|
-
tableColumnRename(attachOpaqueData: AttachOpaqueData,
|
|
250
|
-
tableColumnDefaultSet(attachOpaqueData: AttachOpaqueData,
|
|
251
|
-
tableColumnDefaultDrop(attachOpaqueData: AttachOpaqueData,
|
|
252
|
-
tableColumnTypeChange(attachOpaqueData: AttachOpaqueData,
|
|
253
|
-
tableNotNullSet(attachOpaqueData: AttachOpaqueData,
|
|
254
|
-
tableNotNullDrop(attachOpaqueData: AttachOpaqueData,
|
|
255
|
-
viewGet(attachOpaqueData: AttachOpaqueData,
|
|
256
|
-
viewCreate(attachOpaqueData: AttachOpaqueData,
|
|
257
|
-
viewDrop(attachOpaqueData: AttachOpaqueData,
|
|
258
|
-
viewRename(attachOpaqueData: AttachOpaqueData,
|
|
259
|
-
viewCommentSet(attachOpaqueData: AttachOpaqueData,
|
|
260
|
-
macroGet(attachOpaqueData: AttachOpaqueData,
|
|
261
|
-
macroCreate(attachOpaqueData: AttachOpaqueData,
|
|
315
|
+
tableCommentSet(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, comment?: string | null, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Awaitable<void>;
|
|
316
|
+
tableRename(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, newName: string, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Awaitable<void>;
|
|
317
|
+
tableColumnAdd(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, columnName: string, columnType: string, defaultValue?: string, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Awaitable<void>;
|
|
318
|
+
tableColumnDrop(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, columnName: string, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Awaitable<void>;
|
|
319
|
+
tableColumnRename(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, columnName: string, newName: string, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Awaitable<void>;
|
|
320
|
+
tableColumnDefaultSet(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, columnName: string, defaultValue: string, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Awaitable<void>;
|
|
321
|
+
tableColumnDefaultDrop(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, columnName: string, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Awaitable<void>;
|
|
322
|
+
tableColumnTypeChange(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, columnName: string, newType: string, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Awaitable<void>;
|
|
323
|
+
tableNotNullSet(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, columnName: string, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Awaitable<void>;
|
|
324
|
+
tableNotNullDrop(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, columnName: string, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Awaitable<void>;
|
|
325
|
+
viewGet(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, transactionOpaqueData?: TransactionOpaqueData): Awaitable<ViewInfo | null>;
|
|
326
|
+
viewCreate(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, definition: string, onConflict: string, transactionOpaqueData?: TransactionOpaqueData): Awaitable<void>;
|
|
327
|
+
viewDrop(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Awaitable<void>;
|
|
328
|
+
viewRename(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, newName: string, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Awaitable<void>;
|
|
329
|
+
viewCommentSet(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, comment?: string | null, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Awaitable<void>;
|
|
330
|
+
macroGet(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, transactionOpaqueData?: TransactionOpaqueData): Awaitable<MacroInfo | null>;
|
|
331
|
+
macroCreate(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, macroType: MacroType, parameters: string[], definition: string, onConflict: string, parameterDefaultValues?: Uint8Array | null,
|
|
262
332
|
/**
|
|
263
333
|
* Optional Arrow schema (one nullable field per parameter, in `parameters`
|
|
264
334
|
* order) serialized as IPC bytes, carrying per-parameter descriptions via the
|
|
@@ -266,10 +336,10 @@ export declare abstract class CatalogInterface {
|
|
|
266
336
|
* supplied. Build with `macroArgumentsSchema` + `serializeSchema`.
|
|
267
337
|
*/
|
|
268
338
|
argumentsSchema?: Uint8Array | null, transactionOpaqueData?: TransactionOpaqueData): Awaitable<void>;
|
|
269
|
-
macroDrop(attachOpaqueData: AttachOpaqueData,
|
|
270
|
-
schemaContentsMacros(attachOpaqueData: AttachOpaqueData,
|
|
271
|
-
schemaContentsIndexes(attachOpaqueData: AttachOpaqueData,
|
|
272
|
-
indexGet(attachOpaqueData: AttachOpaqueData,
|
|
339
|
+
macroDrop(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Awaitable<void>;
|
|
340
|
+
schemaContentsMacros(attachOpaqueData: AttachOpaqueData, path: string[], type: string, transactionOpaqueData?: TransactionOpaqueData): Awaitable<MacroInfo[]>;
|
|
341
|
+
schemaContentsIndexes(attachOpaqueData: AttachOpaqueData, path: string[], transactionOpaqueData?: TransactionOpaqueData): Awaitable<IndexInfo[]>;
|
|
342
|
+
indexGet(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, transactionOpaqueData?: TransactionOpaqueData): Awaitable<IndexInfo | null>;
|
|
273
343
|
/**
|
|
274
344
|
* List custom `COPY ... FROM` formats advertised by this catalog. Catalog-level
|
|
275
345
|
* (not schema-scoped). The default returns an empty list, so catalogs that
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CatalogInterface, type AttachOpaqueData, type TransactionOpaqueData, type CatalogAttachResult, type SchemaInfo, type CatalogInfo, type TableInfo, type ViewInfo, type FunctionInfo, type MacroInfo, type IndexInfo, type CopyFromFormatInfo } from "./interface.js";
|
|
2
|
-
import type
|
|
2
|
+
import { type CatalogDescriptor } from "./descriptors.js";
|
|
3
3
|
import type { FunctionRegistry } from "../functions/registry.js";
|
|
4
4
|
import { type AttachOptionSpec } from "./attach-option.js";
|
|
5
5
|
export declare class ReadOnlyCatalogInterface extends CatalogInterface {
|
|
@@ -8,6 +8,23 @@ export declare class ReadOnlyCatalogInterface extends CatalogInterface {
|
|
|
8
8
|
private _attachments;
|
|
9
9
|
private _version;
|
|
10
10
|
constructor(descriptor: CatalogDescriptor, registry: FunctionRegistry);
|
|
11
|
+
/**
|
|
12
|
+
* Which schema declares `fn`, by object identity, or null if no schema does.
|
|
13
|
+
*
|
|
14
|
+
* A table's backing function is NOT necessarily declared in the table's own
|
|
15
|
+
* schema — `data.large_sequence` scans via `sequence`, which the example
|
|
16
|
+
* catalog declares in `main`. Populating `ScanFunctionResult.schemaPath` /
|
|
17
|
+
* `ScanBranch.schemaPath` (protocol 2.0.0) correctly needs this reverse
|
|
18
|
+
* lookup, not the `schemaPath` parameter of the call being served.
|
|
19
|
+
*
|
|
20
|
+
* Identity, not name: the whole point of the field is to disambiguate one
|
|
21
|
+
* name declared in several schemas, so a name match would answer the very
|
|
22
|
+
* question being asked. Null when the function is deliberately unadvertised
|
|
23
|
+
* (`cache_multicol`) — it has no schema to report and the client falls back
|
|
24
|
+
* to its own heuristic, which is exactly the pre-1.5.0 behaviour.
|
|
25
|
+
* Mirrors vgi-python's `ReadOnlyCatalogInterface._schema_for_function`.
|
|
26
|
+
*/
|
|
27
|
+
private _schemaForFunction;
|
|
11
28
|
catalogs(): string[];
|
|
12
29
|
/**
|
|
13
30
|
* Attach-time options this catalog declares, for the named catalog.
|
|
@@ -25,18 +42,18 @@ export declare class ReadOnlyCatalogInterface extends CatalogInterface {
|
|
|
25
42
|
version(attachOpaqueData: AttachOpaqueData, transactionOpaqueData?: TransactionOpaqueData): number | Promise<number>;
|
|
26
43
|
schemas(attachOpaqueData: AttachOpaqueData, transactionOpaqueData?: TransactionOpaqueData): SchemaInfo[];
|
|
27
44
|
private _estimatedObjectCount;
|
|
28
|
-
schemaGet(attachOpaqueData: AttachOpaqueData,
|
|
29
|
-
schemaContentsTables(attachOpaqueData: AttachOpaqueData,
|
|
30
|
-
tableColumnStatisticsGet(attachOpaqueData: AttachOpaqueData,
|
|
45
|
+
schemaGet(attachOpaqueData: AttachOpaqueData, path: string[], transactionOpaqueData?: TransactionOpaqueData): SchemaInfo | null;
|
|
46
|
+
schemaContentsTables(attachOpaqueData: AttachOpaqueData, path: string[], transactionOpaqueData?: TransactionOpaqueData): Promise<TableInfo[]>;
|
|
47
|
+
tableColumnStatisticsGet(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, transactionOpaqueData?: TransactionOpaqueData): {
|
|
31
48
|
bytes: Uint8Array;
|
|
32
49
|
cacheMaxAgeSeconds: number | null;
|
|
33
50
|
} | null;
|
|
34
|
-
schemaContentsViews(attachOpaqueData: AttachOpaqueData,
|
|
35
|
-
schemaContentsFunctions(attachOpaqueData: AttachOpaqueData,
|
|
51
|
+
schemaContentsViews(attachOpaqueData: AttachOpaqueData, path: string[], transactionOpaqueData?: TransactionOpaqueData): ViewInfo[];
|
|
52
|
+
schemaContentsFunctions(attachOpaqueData: AttachOpaqueData, path: string[], type: string, transactionOpaqueData?: TransactionOpaqueData): FunctionInfo[];
|
|
36
53
|
/**
|
|
37
54
|
* Build the wire `FunctionInfo` for one declared function.
|
|
38
55
|
*
|
|
39
|
-
* `
|
|
56
|
+
* `schemaPath` is the schema the function actually lives in — it is the
|
|
40
57
|
* bind-dispatch key, so a function advertised through more than one route
|
|
41
58
|
* (schema contents *and* `global_functions`) must carry the same value in
|
|
42
59
|
* both. Shared by `schemaContentsFunctions` and `_globalFunctionInfos`.
|
|
@@ -45,7 +62,7 @@ export declare class ReadOnlyCatalogInterface extends CatalogInterface {
|
|
|
45
62
|
/**
|
|
46
63
|
* Build `FunctionInfo` records for `CatalogDescriptor.globalFunctions`.
|
|
47
64
|
*
|
|
48
|
-
* Each entry's `
|
|
65
|
+
* Each entry's `schema_path` is the schema it actually lives in — the
|
|
49
66
|
* globally visible name is derived client-side from
|
|
50
67
|
* `global_function_prefix`, so `name` stays unprefixed here. An entry not
|
|
51
68
|
* declared in any schema is a descriptor bug, so it throws rather than
|
|
@@ -53,12 +70,12 @@ export declare class ReadOnlyCatalogInterface extends CatalogInterface {
|
|
|
53
70
|
* `_global_function_infos`.
|
|
54
71
|
*/
|
|
55
72
|
private _globalFunctionInfos;
|
|
56
|
-
schemaContentsMacros(attachOpaqueData: AttachOpaqueData,
|
|
57
|
-
schemaContentsIndexes(attachOpaqueData: AttachOpaqueData,
|
|
58
|
-
indexGet(attachOpaqueData: AttachOpaqueData,
|
|
59
|
-
macroGet(attachOpaqueData: AttachOpaqueData,
|
|
60
|
-
tableScanFunctionGet(attachOpaqueData: AttachOpaqueData,
|
|
61
|
-
tableGet(attachOpaqueData: AttachOpaqueData,
|
|
62
|
-
viewGet(attachOpaqueData: AttachOpaqueData,
|
|
73
|
+
schemaContentsMacros(attachOpaqueData: AttachOpaqueData, path: string[], type: string, transactionOpaqueData?: TransactionOpaqueData): MacroInfo[];
|
|
74
|
+
schemaContentsIndexes(attachOpaqueData: AttachOpaqueData, path: string[], transactionOpaqueData?: TransactionOpaqueData): IndexInfo[];
|
|
75
|
+
indexGet(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, transactionOpaqueData?: TransactionOpaqueData): IndexInfo | null;
|
|
76
|
+
macroGet(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, transactionOpaqueData?: TransactionOpaqueData): MacroInfo | null;
|
|
77
|
+
tableScanFunctionGet(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, atUnit?: string, atValue?: string, transactionOpaqueData?: TransactionOpaqueData): any;
|
|
78
|
+
tableGet(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, atUnit?: string, atValue?: string, transactionOpaqueData?: TransactionOpaqueData): Promise<TableInfo | null>;
|
|
79
|
+
viewGet(attachOpaqueData: AttachOpaqueData, schemaPath: string[], name: string, transactionOpaqueData?: TransactionOpaqueData): ViewInfo | null;
|
|
63
80
|
copyFromFormats(attachOpaqueData: AttachOpaqueData, transactionOpaqueData?: TransactionOpaqueData): CopyFromFormatInfo[];
|
|
64
81
|
}
|
package/dist/client/client.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import type { VgiClientOptions, TableFunctionOptions, ScalarFunctionOptions, Tab
|
|
|
10
10
|
* Works with any RpcClient transport (subprocess or HTTP):
|
|
11
11
|
* ```ts
|
|
12
12
|
* import { subprocessConnect } from "@query-farm/vgi-rpc";
|
|
13
|
-
* import { VgiClient, Arguments } from "vgi";
|
|
13
|
+
* import { VgiClient, Arguments } from "@query-farm/vgi";
|
|
14
14
|
*
|
|
15
15
|
* const rpc = subprocessConnect(["./my-worker"]);
|
|
16
16
|
* const client = new VgiClient(rpc);
|
|
@@ -37,6 +37,13 @@ export declare class VgiClient {
|
|
|
37
37
|
* attached catalogs.
|
|
38
38
|
*/
|
|
39
39
|
constructor(rpc: RpcClient, options?: VgiClientOptions);
|
|
40
|
+
/**
|
|
41
|
+
* Connect the high-level client to a canonical `iroh://` or `httpi://`
|
|
42
|
+
* endpoint. Native Node/Bun connectors are selected from the URI scheme.
|
|
43
|
+
* Browser callers may inject the connector exported by the browser Iroh
|
|
44
|
+
* package without changing the VGI client API.
|
|
45
|
+
*/
|
|
46
|
+
static fromIroh(endpoint: string, options?: Record<string, unknown>, clientOptions?: VgiClientOptions, connector?: (endpoint: string, options: Record<string, unknown>) => Promise<RpcClient>): Promise<VgiClient>;
|
|
40
47
|
private _doBind;
|
|
41
48
|
private _doInit;
|
|
42
49
|
/** Call a table function, yielding output as RecordBatch instances. */
|
|
@@ -112,48 +119,48 @@ export declare class VgiClient {
|
|
|
112
119
|
/** List schemas in an attached catalog. */
|
|
113
120
|
schemas(attachOpaqueData: AttachOpaqueData, transactionOpaqueData?: TransactionOpaqueData): Promise<SchemaInfo[]>;
|
|
114
121
|
/** Get a schema by name, or null if not found. */
|
|
115
|
-
schemaGet(attachOpaqueData: AttachOpaqueData,
|
|
122
|
+
schemaGet(attachOpaqueData: AttachOpaqueData, path: string[] | string, transactionOpaqueData?: TransactionOpaqueData): Promise<SchemaInfo | null>;
|
|
116
123
|
/** Create a new schema. */
|
|
117
|
-
schemaCreate(attachOpaqueData: AttachOpaqueData,
|
|
124
|
+
schemaCreate(attachOpaqueData: AttachOpaqueData, path: string[] | string, opts?: {
|
|
118
125
|
onConflict?: OnCreateConflict;
|
|
119
126
|
comment?: string | null;
|
|
120
127
|
tags?: Record<string, string> | null;
|
|
121
128
|
transactionOpaqueData?: TransactionOpaqueData;
|
|
122
129
|
}): Promise<void>;
|
|
123
130
|
/** Drop a schema by name. */
|
|
124
|
-
schemaDrop(attachOpaqueData: AttachOpaqueData,
|
|
131
|
+
schemaDrop(attachOpaqueData: AttachOpaqueData, path: string[] | string, ignoreNotFound?: boolean, cascade?: boolean, transactionOpaqueData?: TransactionOpaqueData): Promise<void>;
|
|
125
132
|
/** List tables in a schema. */
|
|
126
|
-
schemaContentsTables(attachOpaqueData: AttachOpaqueData,
|
|
133
|
+
schemaContentsTables(attachOpaqueData: AttachOpaqueData, path: string[] | string, transactionOpaqueData?: TransactionOpaqueData): Promise<TableInfo[]>;
|
|
127
134
|
/** List views in a schema. */
|
|
128
|
-
schemaContentsViews(attachOpaqueData: AttachOpaqueData,
|
|
135
|
+
schemaContentsViews(attachOpaqueData: AttachOpaqueData, path: string[] | string, transactionOpaqueData?: TransactionOpaqueData): Promise<ViewInfo[]>;
|
|
129
136
|
/** List functions in a schema, filtered by type. */
|
|
130
|
-
schemaContentsFunctions(attachOpaqueData: AttachOpaqueData,
|
|
137
|
+
schemaContentsFunctions(attachOpaqueData: AttachOpaqueData, path: string[] | string, type: CatalogFunctionType, transactionOpaqueData?: TransactionOpaqueData): Promise<FunctionInfo[]>;
|
|
131
138
|
/** Get a table by name, or null if not found. */
|
|
132
|
-
tableGet(attachOpaqueData: AttachOpaqueData,
|
|
139
|
+
tableGet(attachOpaqueData: AttachOpaqueData, schemaPath: string[] | string, name: string, transactionOpaqueData?: TransactionOpaqueData): Promise<TableInfo | null>;
|
|
133
140
|
/** Create a new table. */
|
|
134
|
-
tableCreate(attachOpaqueData: AttachOpaqueData,
|
|
141
|
+
tableCreate(attachOpaqueData: AttachOpaqueData, schemaPath: string[] | string, name: string, columns: Uint8Array, onConflict: OnCreateConflict, notNullConstraints?: number[], uniqueConstraints?: number[][], checkConstraints?: string[], transactionOpaqueData?: TransactionOpaqueData): Promise<void>;
|
|
135
142
|
/** Drop a table by name. */
|
|
136
|
-
tableDrop(attachOpaqueData: AttachOpaqueData,
|
|
143
|
+
tableDrop(attachOpaqueData: AttachOpaqueData, schemaPath: string[] | string, name: string, ignoreNotFound?: boolean, cascade?: boolean, transactionOpaqueData?: TransactionOpaqueData): Promise<void>;
|
|
137
144
|
/**
|
|
138
145
|
* Get the scan function for a table — tells DuckDB which function to call
|
|
139
146
|
* to read the table data (e.g. `read_parquet` with a path argument). Used
|
|
140
147
|
* by the VGI extension during query planning.
|
|
141
148
|
*/
|
|
142
|
-
tableScanFunctionGet(attachOpaqueData: AttachOpaqueData,
|
|
149
|
+
tableScanFunctionGet(attachOpaqueData: AttachOpaqueData, schemaPath: string[] | string, name: string, atUnit?: string | null, atValue?: string | null, transactionOpaqueData?: TransactionOpaqueData): Promise<ScanFunctionResult>;
|
|
143
150
|
/** Set or clear the comment on a table. */
|
|
144
|
-
tableCommentSet(attachOpaqueData: AttachOpaqueData,
|
|
151
|
+
tableCommentSet(attachOpaqueData: AttachOpaqueData, schemaPath: string[] | string, name: string, comment?: string | null, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Promise<void>;
|
|
145
152
|
/** Rename a table. */
|
|
146
|
-
tableRename(attachOpaqueData: AttachOpaqueData,
|
|
153
|
+
tableRename(attachOpaqueData: AttachOpaqueData, schemaPath: string[] | string, name: string, newName: string, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Promise<void>;
|
|
147
154
|
/** Add a column to a table. */
|
|
148
|
-
tableColumnAdd(attachOpaqueData: AttachOpaqueData,
|
|
155
|
+
tableColumnAdd(attachOpaqueData: AttachOpaqueData, schemaPath: string[] | string, name: string, columnName: string, columnType: string, defaultValue?: string | null, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Promise<void>;
|
|
149
156
|
/** Drop a column from a table. */
|
|
150
|
-
tableColumnDrop(attachOpaqueData: AttachOpaqueData,
|
|
157
|
+
tableColumnDrop(attachOpaqueData: AttachOpaqueData, schemaPath: string[] | string, name: string, columnName: string, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Promise<void>;
|
|
151
158
|
/** Rename a column in a table. */
|
|
152
|
-
tableColumnRename(attachOpaqueData: AttachOpaqueData,
|
|
159
|
+
tableColumnRename(attachOpaqueData: AttachOpaqueData, schemaPath: string[] | string, name: string, columnName: string, newName: string, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Promise<void>;
|
|
153
160
|
/** Set the default value for a column. */
|
|
154
|
-
tableColumnDefaultSet(attachOpaqueData: AttachOpaqueData,
|
|
161
|
+
tableColumnDefaultSet(attachOpaqueData: AttachOpaqueData, schemaPath: string[] | string, name: string, columnName: string, defaultValue: string, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Promise<void>;
|
|
155
162
|
/** Remove the default value from a column. */
|
|
156
|
-
tableColumnDefaultDrop(attachOpaqueData: AttachOpaqueData,
|
|
163
|
+
tableColumnDefaultDrop(attachOpaqueData: AttachOpaqueData, schemaPath: string[] | string, name: string, columnName: string, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Promise<void>;
|
|
157
164
|
/**
|
|
158
165
|
* Change the type of a column.
|
|
159
166
|
*
|
|
@@ -161,29 +168,29 @@ export declare class VgiClient {
|
|
|
161
168
|
* name identifies the target column and whose type is the new column type.
|
|
162
169
|
* `expression` is an optional SQL expression used to convert existing values.
|
|
163
170
|
*/
|
|
164
|
-
tableColumnTypeChange(attachOpaqueData: AttachOpaqueData,
|
|
171
|
+
tableColumnTypeChange(attachOpaqueData: AttachOpaqueData, schemaPath: string[] | string, name: string, columnDefinition: Uint8Array, expression?: string | null, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Promise<void>;
|
|
165
172
|
/** Set a NOT NULL constraint on a column. */
|
|
166
|
-
tableNotNullSet(attachOpaqueData: AttachOpaqueData,
|
|
173
|
+
tableNotNullSet(attachOpaqueData: AttachOpaqueData, schemaPath: string[] | string, name: string, columnName: string, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Promise<void>;
|
|
167
174
|
/** Remove a NOT NULL constraint from a column. */
|
|
168
|
-
tableNotNullDrop(attachOpaqueData: AttachOpaqueData,
|
|
175
|
+
tableNotNullDrop(attachOpaqueData: AttachOpaqueData, schemaPath: string[] | string, name: string, columnName: string, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Promise<void>;
|
|
169
176
|
/** Get a view by name, or null if not found. */
|
|
170
|
-
viewGet(attachOpaqueData: AttachOpaqueData,
|
|
177
|
+
viewGet(attachOpaqueData: AttachOpaqueData, schemaPath: string[] | string, name: string, transactionOpaqueData?: TransactionOpaqueData): Promise<ViewInfo | null>;
|
|
171
178
|
/** Create a new view. */
|
|
172
|
-
viewCreate(attachOpaqueData: AttachOpaqueData,
|
|
179
|
+
viewCreate(attachOpaqueData: AttachOpaqueData, schemaPath: string[] | string, name: string, definition: string, onConflict: OnCreateConflict, transactionOpaqueData?: TransactionOpaqueData): Promise<void>;
|
|
173
180
|
/** Drop a view by name. */
|
|
174
|
-
viewDrop(attachOpaqueData: AttachOpaqueData,
|
|
181
|
+
viewDrop(attachOpaqueData: AttachOpaqueData, schemaPath: string[] | string, name: string, ignoreNotFound?: boolean, cascade?: boolean, transactionOpaqueData?: TransactionOpaqueData): Promise<void>;
|
|
175
182
|
/** Rename a view. */
|
|
176
|
-
viewRename(attachOpaqueData: AttachOpaqueData,
|
|
183
|
+
viewRename(attachOpaqueData: AttachOpaqueData, schemaPath: string[] | string, name: string, newName: string, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Promise<void>;
|
|
177
184
|
/** Set or clear the comment on a view. */
|
|
178
|
-
viewCommentSet(attachOpaqueData: AttachOpaqueData,
|
|
185
|
+
viewCommentSet(attachOpaqueData: AttachOpaqueData, schemaPath: string[] | string, name: string, comment?: string | null, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Promise<void>;
|
|
179
186
|
/** Get a macro by name, or null if not found. */
|
|
180
|
-
macroGet(attachOpaqueData: AttachOpaqueData,
|
|
187
|
+
macroGet(attachOpaqueData: AttachOpaqueData, schemaPath: string[] | string, name: string, transactionOpaqueData?: TransactionOpaqueData): Promise<MacroInfo | null>;
|
|
181
188
|
/** List macros in a schema, filtered by type. */
|
|
182
|
-
schemaContentsMacros(attachOpaqueData: AttachOpaqueData,
|
|
189
|
+
schemaContentsMacros(attachOpaqueData: AttachOpaqueData, path: string[] | string, type: CatalogMacroType, transactionOpaqueData?: TransactionOpaqueData): Promise<MacroInfo[]>;
|
|
183
190
|
/** Create a new macro. */
|
|
184
|
-
macroCreate(attachOpaqueData: AttachOpaqueData,
|
|
191
|
+
macroCreate(attachOpaqueData: AttachOpaqueData, schemaPath: string[] | string, name: string, macroType: MacroType, parameters: string[], definition: string, onConflict: OnCreateConflict, parameterDefaultValues?: Uint8Array | null, argumentsSchema?: Uint8Array | null, transactionOpaqueData?: TransactionOpaqueData): Promise<void>;
|
|
185
192
|
/** Drop a macro by name. */
|
|
186
|
-
macroDrop(attachOpaqueData: AttachOpaqueData,
|
|
193
|
+
macroDrop(attachOpaqueData: AttachOpaqueData, schemaPath: string[] | string, name: string, ignoreNotFound?: boolean, transactionOpaqueData?: TransactionOpaqueData): Promise<void>;
|
|
187
194
|
/** Close the underlying RPC connection. */
|
|
188
195
|
close(): void;
|
|
189
196
|
}
|
package/dist/client/types.d.ts
CHANGED
|
@@ -40,6 +40,8 @@ export interface CatalogAttachOptions {
|
|
|
40
40
|
optionsBytes?: Uint8Array;
|
|
41
41
|
dataVersionSpec?: string | null;
|
|
42
42
|
implementationVersion?: string | null;
|
|
43
|
+
/** Engine capabilities serialized into the protocol's named inner record. */
|
|
44
|
+
clientCapabilities?: import("../generated/vgi-client.js").ClientCapabilities | null;
|
|
43
45
|
}
|
|
44
46
|
/** Conflict resolution strategy for create operations. */
|
|
45
47
|
export type OnCreateConflict = "error" | "ignore" | "replace";
|
package/dist/client-entry.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { VgiClient, VgiClientError } from "./client/client.js";
|
|
|
2
2
|
export type { VgiClientOptions, TableFunctionOptions, ScalarFunctionOptions, TableInOutFunctionOptions, OnCreateConflict, CatalogFunctionType, } from "./client/types.js";
|
|
3
3
|
export { Arguments } from "./arguments/arguments.js";
|
|
4
4
|
export { type ArgumentSpec, argumentSpecsToSchema, schemaToArgumentSpecs, } from "./arguments/argument-spec.js";
|
|
5
|
-
export { FunctionType, FunctionStability, NullHandling, OrderPreservation, OrderDependence, DistinctDependence, TableInOutPhase, } from "./types.js";
|
|
5
|
+
export { FunctionType, FunctionStability, NullHandling, ArgumentMonotonicity, OrderPreservation, OrderDependence, DistinctDependence, TableInOutPhase, } from "./types.js";
|
|
6
6
|
export type { BindRequest, BindResponse, InitRequest, GlobalInitResponse, TableCardinality, } from "./protocol/types.js";
|
|
7
7
|
export { type SchemaInfo, encodeSchemaInfo, decodeSchemaInfo, type TableInfo, encodeTableInfo, decodeTableInfo, type ViewInfo, encodeViewInfo, decodeViewInfo, type FunctionInfo, encodeFunctionInfo, decodeFunctionInfo, type MacroInfo, encodeMacroInfo, decodeMacroInfo, type CatalogAttachResult, type AttachOpaqueData, type TransactionOpaqueData, } from "./catalog/interface.js";
|
|
8
8
|
export { VgiError, RowCountMismatchError, FunctionNotFoundError, CatalogReadOnlyError, CatalogNotFoundError, CatalogAlreadyExistsError, ArgumentValidationError, NoCatalogError, } from "./errors.js";
|