@query-farm/vgi 0.44.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/arrow/impl-arrowjs/index.d.ts +1 -1
- package/dist/arrow/impl-arrowjs/ipc.d.ts +6 -0
- package/dist/arrow/impl-flechette/build.d.ts +2 -2
- package/dist/arrow/impl-flechette/canonical.d.ts +1 -1
- package/dist/arrow/impl-flechette/index.d.ts +1 -1
- package/dist/arrow/impl-flechette/ipc.d.ts +6 -0
- package/dist/arrow/index.d.ts +1 -1
- package/dist/catalog/contents-codec.d.ts +7 -0
- package/dist/catalog/contents-digest.d.ts +2 -1
- package/dist/catalog/interface.d.ts +3 -0
- package/dist/catalog/publication-envelope.d.ts +1 -0
- package/dist/catalog/publication.d.ts +142 -0
- package/dist/catalog/s3-publication.d.ts +38 -0
- package/dist/client-entry.js +136 -25
- package/dist/client-entry.js.map +13 -12
- package/dist/codec/asd.d.ts +4 -0
- package/dist/generated/vgi-client.d.ts +6 -14
- package/dist/generated/vgi-protocol-schemas.d.ts +2 -0
- package/dist/generated/vgi-protocol-types.d.ts +26 -3
- package/dist/generated/vgi-service.d.ts +3 -3
- package/dist/index.d.ts +4 -0
- package/dist/index.js +739 -81
- package/dist/index.js.map +24 -20
- package/dist/protocol/dispatch.d.ts +1 -1
- package/dist/protocol/handlers/catalog/contents.d.ts +4 -4
- package/dist/serve-entry.js +610 -78
- package/dist/serve-entry.js.map +19 -16
- package/dist/worker-cf-entry.js +626 -86
- package/dist/worker-cf-entry.js.map +21 -18
- package/package.json +3 -3
- package/src/arrow/impl-arrowjs/index.ts +1 -0
- package/src/arrow/impl-arrowjs/ipc.ts +23 -0
- package/src/arrow/impl-flechette/build.ts +4 -2
- package/src/arrow/impl-flechette/canonical.ts +7 -2
- package/src/arrow/impl-flechette/index.ts +1 -0
- package/src/arrow/impl-flechette/ipc.ts +19 -0
- package/src/arrow/index.ts +1 -1
- package/src/catalog/contents-codec.ts +77 -0
- package/src/catalog/contents-digest.ts +20 -17
- package/src/catalog/interface.ts +3 -0
- package/src/catalog/publication-envelope.ts +62 -0
- package/src/catalog/publication.ts +290 -0
- package/src/catalog/read-only.ts +0 -2
- package/src/catalog/s3-publication.ts +81 -0
- package/src/client/client.ts +2 -19
- package/src/codec/asd.ts +40 -1
- package/src/codec/conform.ts +2 -1
- package/src/generated/vgi-client.ts +7 -16
- package/src/generated/vgi-protocol-schemas.ts +13 -6
- package/src/generated/vgi-protocol-types.ts +39 -5
- package/src/generated/vgi-service.ts +4 -3
- package/src/index.ts +5 -0
- package/src/protocol/dispatch.ts +1 -1
- package/src/protocol/handlers/catalog/admin.ts +7 -4
- package/src/protocol/handlers/catalog/contents.ts +50 -35
package/dist/codec/asd.d.ts
CHANGED
|
@@ -33,3 +33,7 @@ export declare function sortMapsForSchema(schema: VgiSchema, obj: Record<string,
|
|
|
33
33
|
* Matches Python's `ArrowSerializableDataclass.deserialize_from_bytes()`.
|
|
34
34
|
*/
|
|
35
35
|
export declare function decodeASD<T>(schema: VgiSchema, bytes: Uint8Array): T;
|
|
36
|
+
/** Encode ordinary metadata records directly, sharing one schema and dictionary per category. */
|
|
37
|
+
export declare function encodeASDCollection(schema: VgiSchema, records: readonly Record<string, any>[]): Uint8Array | null;
|
|
38
|
+
/** Decode every row of every batch and reject incompatible collection schemas. */
|
|
39
|
+
export declare function decodeASDCollection<T>(schema: VgiSchema, bytes: Uint8Array | null | undefined): T[];
|
|
@@ -31,7 +31,6 @@ export interface CatalogInfo {
|
|
|
31
31
|
export interface SchemaInfo {
|
|
32
32
|
comment?: string | null;
|
|
33
33
|
tags: Record<string, string>;
|
|
34
|
-
attach_opaque_data: Uint8Array;
|
|
35
34
|
path: string[];
|
|
36
35
|
estimated_object_count?: Record<string, number> | null;
|
|
37
36
|
}
|
|
@@ -362,23 +361,16 @@ export interface CatalogAttachResult {
|
|
|
362
361
|
export interface CatalogsResponse {
|
|
363
362
|
items: CatalogInfo[];
|
|
364
363
|
}
|
|
365
|
-
export interface SchemaContents {
|
|
366
|
-
path: string[];
|
|
367
|
-
schema: Uint8Array;
|
|
368
|
-
tables: Uint8Array[];
|
|
369
|
-
views: Uint8Array[];
|
|
370
|
-
scalar_functions: Uint8Array[];
|
|
371
|
-
aggregate_functions: Uint8Array[];
|
|
372
|
-
table_functions: Uint8Array[];
|
|
373
|
-
scalar_macros: Uint8Array[];
|
|
374
|
-
table_macros: Uint8Array[];
|
|
375
|
-
indexes: Uint8Array[];
|
|
376
|
-
}
|
|
377
364
|
export interface CatalogContentsResponse {
|
|
378
365
|
catalog_version: number;
|
|
379
366
|
etag?: string | null;
|
|
380
367
|
not_modified: boolean;
|
|
381
|
-
schemas
|
|
368
|
+
schemas?: Uint8Array | null;
|
|
369
|
+
tables?: Uint8Array | null;
|
|
370
|
+
views?: Uint8Array | null;
|
|
371
|
+
functions?: Uint8Array | null;
|
|
372
|
+
macros?: Uint8Array | null;
|
|
373
|
+
indexes?: Uint8Array | null;
|
|
382
374
|
}
|
|
383
375
|
export interface CopyFromFormatsResponse {
|
|
384
376
|
items: Uint8Array[];
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** Canonical fingerprint of the nested catalog wire schemas. */
|
|
2
|
+
export declare const VGI_CATALOG_CONTRACT_HASH = "121e8fe1c074bce00a6d0fcec49d7a90f05e45498cd9ca8a5a3b4a9ae2377a2d";
|
|
1
3
|
export declare const CatalogInfoSchema: import("../index.core.js").VgiSchema;
|
|
2
4
|
export declare const SchemaInfoSchema: import("../index.core.js").VgiSchema;
|
|
3
5
|
export declare const TableInfoSchema: import("../index.core.js").VgiSchema;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CatalogAttachResult, CatalogContentsResponse
|
|
2
|
-
export type { CatalogAttachResult, CatalogContentsResponse
|
|
1
|
+
import type { CatalogAttachResult, CatalogContentsResponse } from "./vgi-client.js";
|
|
2
|
+
export type { CatalogAttachResult, CatalogContentsResponse };
|
|
3
3
|
/** Fields of `CatalogAttachResult` that have a protocol default. */
|
|
4
4
|
export type CatalogAttachResultDefaultedField = "attach_opaque_data_required" | "default_schema" | "settings" | "secret_types" | "attach_catalogs" | "comment" | "tags" | "supports_column_statistics" | "global_functions" | "global_function_prefix" | "supports_catalog_contents";
|
|
5
5
|
/** `CatalogAttachResult` with every field that has a protocol default optional. */
|
|
@@ -8,6 +8,29 @@ export type CatalogAttachResultInit = Omit<CatalogAttachResult, CatalogAttachRes
|
|
|
8
8
|
export declare function buildCatalogAttachResult(init: CatalogAttachResultInit): CatalogAttachResult;
|
|
9
9
|
export declare const encodeCatalogAttachResult: (v: CatalogAttachResult) => Uint8Array;
|
|
10
10
|
export declare const decodeCatalogAttachResult: (b: Uint8Array) => CatalogAttachResult;
|
|
11
|
+
/** One schema and everything in it: one struct row of `CatalogContentsResponse.schemas`. Every item is byte-for-byte what the matching per-schema RPC returns in its `items` list, so a client decodes them with the decoders it already has. Each kind is complete: an empty list means the schema has none of that kind. */
|
|
12
|
+
export interface SchemaContents {
|
|
13
|
+
/** The schema path. Equals `SchemaInfo.path` inside `schema`, so a client can name the schema without decoding it. */
|
|
14
|
+
path: string[];
|
|
15
|
+
/** The schema's `SchemaInfo` item (a `catalog_schemas` entry). */
|
|
16
|
+
schema: Uint8Array;
|
|
17
|
+
/** `TableInfo` items (`catalog_schema_contents_tables`). */
|
|
18
|
+
tables: Uint8Array[];
|
|
19
|
+
/** `ViewInfo` items (`catalog_schema_contents_views`). */
|
|
20
|
+
views: Uint8Array[];
|
|
21
|
+
/** `FunctionInfo` items, `SCALAR_FUNCTION`. */
|
|
22
|
+
scalar_functions: Uint8Array[];
|
|
23
|
+
/** `FunctionInfo` items, `AGGREGATE_FUNCTION`. */
|
|
24
|
+
aggregate_functions: Uint8Array[];
|
|
25
|
+
/** `FunctionInfo` items, `TABLE_FUNCTION`. */
|
|
26
|
+
table_functions: Uint8Array[];
|
|
27
|
+
/** `MacroInfo` items, `SCALAR_MACRO`. */
|
|
28
|
+
scalar_macros: Uint8Array[];
|
|
29
|
+
/** `MacroInfo` items, `TABLE_MACRO`. */
|
|
30
|
+
table_macros: Uint8Array[];
|
|
31
|
+
/** `IndexInfo` items (`catalog_schema_contents_indexes`). */
|
|
32
|
+
indexes: Uint8Array[];
|
|
33
|
+
}
|
|
11
34
|
/** Fields of `SchemaContents` that have a protocol default. */
|
|
12
35
|
export type SchemaContentsDefaultedField = "tables" | "views" | "scalar_functions" | "aggregate_functions" | "table_functions" | "scalar_macros" | "table_macros" | "indexes";
|
|
13
36
|
/** `SchemaContents` with every field that has a protocol default optional. */
|
|
@@ -17,7 +40,7 @@ export declare function buildSchemaContents(init: SchemaContentsInit): SchemaCon
|
|
|
17
40
|
export declare const encodeSchemaContents: (v: SchemaContents) => Uint8Array;
|
|
18
41
|
export declare const decodeSchemaContents: (b: Uint8Array) => SchemaContents;
|
|
19
42
|
/** Fields of `CatalogContentsResponse` that have a protocol default. */
|
|
20
|
-
export type CatalogContentsResponseDefaultedField = "etag" | "not_modified" | "schemas";
|
|
43
|
+
export type CatalogContentsResponseDefaultedField = "etag" | "not_modified" | "schemas" | "tables" | "views" | "functions" | "macros" | "indexes";
|
|
21
44
|
/** `CatalogContentsResponse` with every field that has a protocol default optional. */
|
|
22
45
|
export type CatalogContentsResponseInit = Omit<CatalogContentsResponse, CatalogContentsResponseDefaultedField> & Partial<Pick<CatalogContentsResponse, CatalogContentsResponseDefaultedField>>;
|
|
23
46
|
/** Build a complete `CatalogContentsResponse`, filling the protocol defaults, in wire order. */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { type CallContext, type ExchangeFn, type ExchangeInit, type HeaderInit, type ProducerFn, type ProducerInit, Protocol, type SchemaLike } from "@query-farm/vgi-rpc";
|
|
1
|
+
import { type CallContext, type ExchangeFn, type ExternalRef, type ExchangeInit, type HeaderInit, type ProducerFn, type ProducerInit, Protocol, type SchemaLike } from "@query-farm/vgi-rpc";
|
|
2
2
|
import { type VgiSchema } from "../arrow/index.js";
|
|
3
3
|
/** The protocol's wire name: the `vgi_rpc.protocol` routing key and the HTTP path segment. */
|
|
4
4
|
export declare const VGI_PROTOCOL_NAME = "vgi.v2";
|
|
5
5
|
/** The protocol's semver, stamped on every request by a client of this protocol. */
|
|
6
|
-
export declare const VGI_PROTOCOL_VERSION = "2.
|
|
6
|
+
export declare const VGI_PROTOCOL_VERSION = "2.2.0";
|
|
7
7
|
/** What a unary handler returns: the result row, now or later. */
|
|
8
|
-
export type VgiReply<T> = T | Promise<T>;
|
|
8
|
+
export type VgiReply<T> = T | ExternalRef | Promise<T | ExternalRef>;
|
|
9
9
|
/** The result of a unary method with no `result` column. */
|
|
10
10
|
export type NoResult = Record<string, never>;
|
|
11
11
|
/** A `list` column's value as the Arrow backend decodes it: a vector on arrow-js, an array on flechette. */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
export * from "./index.core.js";
|
|
2
2
|
export { Worker, type WorkerConfig } from "./worker.js";
|
|
3
|
+
export { CatalogSnapshotManager, MemoryCatalogPublicationRepository, S3CatalogPublicationRepository } from "./catalog/publication.js";
|
|
4
|
+
export type { CatalogSnapshotPolicy, SnapshotIdentity, SnapshotRequest, CatalogPublicationManifest, CatalogPublicationRepository, CatalogManifestObjectStore } from "./catalog/publication.js";
|
|
5
|
+
export { S3CatalogObjectStorage } from "./catalog/s3-publication.js";
|
|
6
|
+
export type { CatalogS3Signer } from "./catalog/s3-publication.js";
|