tabulark 0.1.0 → 0.2.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/CHANGELOG.md +67 -2
- package/README.md +125 -42
- package/dist/client.d.ts +71 -2
- package/dist/errors.d.ts +7 -1
- package/dist/experimental.js +1 -1
- package/dist/experimental.js.map +2 -2
- package/dist/http.d.ts +65 -0
- package/dist/http.js +2 -0
- package/dist/http.js.map +7 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +4 -4
- package/dist/model.d.ts +6 -3
- package/dist/protocol.d.ts +3 -3
- package/dist/range-cache.d.ts +24 -5
- package/dist/range-source.d.ts +64 -0
- package/dist/rpc-client.d.ts +15 -2
- package/dist/source.d.ts +13 -0
- package/dist/view/canvas-table-view-public.d.ts +6 -0
- package/dist/view/canvas-table-view.d.ts +8 -0
- package/dist/wasm/arrow/tabulark_arrow.d.ts +33 -6
- package/dist/wasm/arrow/tabulark_arrow.js +129 -17
- package/dist/wasm/arrow/tabulark_arrow_bg.wasm +0 -0
- package/dist/wasm/arrow/tabulark_arrow_bg.wasm.d.ts +6 -1
- package/dist/wasm/delimited/tabulark_delimited.d.ts +31 -5
- package/dist/wasm/delimited/tabulark_delimited.js +115 -8
- package/dist/wasm/delimited/tabulark_delimited_bg.wasm +0 -0
- package/dist/wasm/delimited/tabulark_delimited_bg.wasm.d.ts +6 -1
- package/dist/wasm/excel/tabulark_excel.d.ts +33 -8
- package/dist/wasm/excel/tabulark_excel.js +129 -19
- package/dist/wasm/excel/tabulark_excel_bg.wasm +0 -0
- package/dist/wasm/excel/tabulark_excel_bg.wasm.d.ts +6 -1
- package/dist/wasm/parquet/tabulark_parquet.d.ts +31 -6
- package/dist/wasm/parquet/tabulark_parquet.js +135 -17
- package/dist/wasm/parquet/tabulark_parquet_bg.wasm +0 -0
- package/dist/wasm/parquet/tabulark_parquet_bg.wasm.d.ts +6 -1
- package/dist/worker/blob-source-accessor.d.ts +10 -0
- package/dist/worker/source-accessor.d.ts +76 -0
- package/dist/worker/wasm-adapter.d.ts +39 -38
- package/dist/worker-range-source.d.ts +1 -0
- package/dist/worker-range-source.js +2 -0
- package/dist/worker-range-source.js.map +7 -0
- package/dist/worker.js +1 -1
- package/dist/worker.js.map +4 -4
- package/package.json +8 -1
package/dist/model.d.ts
CHANGED
|
@@ -9,14 +9,17 @@ export declare const MAX_ACTIVE_RANGES = 2;
|
|
|
9
9
|
export declare const MAX_RANGE_WAITERS = 8;
|
|
10
10
|
export interface MemoryBudgetLimits {
|
|
11
11
|
readonly memoryBudgetBytes: number;
|
|
12
|
+
/** Cross-thread accounting slices used by RangeSource brokers. */
|
|
13
|
+
readonly workerBudgetBytes: number;
|
|
14
|
+
readonly mainThreadSourceBytes: number;
|
|
15
|
+
readonly mainThreadRetainedBytes: number;
|
|
16
|
+
readonly sourceRangeCacheBytes: number;
|
|
12
17
|
/** Shared retained capacity allocated among the adapters actually registered. */
|
|
13
18
|
readonly adapterRuntimePoolBytes: number;
|
|
14
19
|
/** Maximum transient/decoded budget retained by one active adapter operation. */
|
|
15
20
|
readonly operationBudgetBytes: number;
|
|
16
21
|
readonly indexBudgetBytes: number;
|
|
17
22
|
readonly adapterTileCacheBudgetBytes: number;
|
|
18
|
-
readonly workerRangeCacheBytes: number;
|
|
19
|
-
readonly workerDatasetRangeCacheBytes: number;
|
|
20
23
|
readonly mainThreadRangeCacheBytes: number;
|
|
21
24
|
readonly maxFieldBytes: number;
|
|
22
25
|
readonly maxBatchBytes: number;
|
|
@@ -27,7 +30,7 @@ export interface MemoryBudgetLimits {
|
|
|
27
30
|
}
|
|
28
31
|
/** Derives every bounded runtime allocation from one engine-wide budget. */
|
|
29
32
|
export declare function deriveMemoryBudgetLimits(memoryBudgetBytes: number): MemoryBudgetLimits;
|
|
30
|
-
export type MemoryResourceKind = "adapter-runtime" | "source-staging" | "compressed-page" | "decompression" | "
|
|
33
|
+
export type MemoryResourceKind = "adapter-runtime" | "source-staging" | "compressed-page" | "decompression" | "batch";
|
|
31
34
|
export interface MemoryReservation {
|
|
32
35
|
readonly resource: MemoryResourceKind;
|
|
33
36
|
readonly bytes: number;
|
package/dist/protocol.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/** Version
|
|
2
|
-
export declare const PROTOCOL_VERSION:
|
|
1
|
+
/** Version 4 introduces resumable, revisioned operations and main-thread batch ownership. */
|
|
2
|
+
export declare const PROTOCOL_VERSION: 4;
|
|
3
3
|
/** Version of the private, built-in Rust adapter contract. */
|
|
4
|
-
export declare const ADAPTER_API_VERSION:
|
|
4
|
+
export declare const ADAPTER_API_VERSION: 3;
|
|
5
5
|
/** Version of the descriptor + deduplicated-buffer batch transport. */
|
|
6
6
|
export declare const BATCH_LAYOUT_VERSION: 1;
|
|
7
7
|
export type ProtocolVersion = typeof PROTOCOL_VERSION;
|
package/dist/range-cache.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RangeRequest, WireTableBatch } from "./model.js";
|
|
1
|
+
import type { RangeRequest, WireTableBatch, WireTableBatchColumn } from "./model.js";
|
|
2
2
|
export declare class PermitQueueFullError extends Error {
|
|
3
3
|
readonly maxWaiters: number;
|
|
4
4
|
constructor(maxWaiters: number);
|
|
@@ -14,15 +14,34 @@ export declare class AsyncPermitQueue {
|
|
|
14
14
|
export declare class ByteLruCache<T> {
|
|
15
15
|
#private;
|
|
16
16
|
constructor(maxBytes: number, options?: Readonly<{
|
|
17
|
+
maxEntries?: number;
|
|
18
|
+
minimumEntryBytes?: number;
|
|
17
19
|
onRemove?: (key: string, value: T, byteLength: number) => void;
|
|
18
20
|
}>);
|
|
19
21
|
get maxBytes(): number;
|
|
22
|
+
get maxEntries(): number;
|
|
20
23
|
get(key: string): T | undefined;
|
|
21
|
-
set(key: string, value: T, byteLength: number): void;
|
|
24
|
+
set(key: string, value: T, byteLength: number, maxBytes?: number): void;
|
|
25
|
+
/** Evicts least-recently-used entries until the requested live cap is met. */
|
|
26
|
+
trimTo(maxBytes: number): void;
|
|
22
27
|
deleteWhere(predicate: (key: string, value: T) => boolean): void;
|
|
23
28
|
clear(): void;
|
|
24
29
|
}
|
|
25
|
-
export declare function rangeCacheKey(
|
|
26
|
-
export declare function
|
|
27
|
-
export declare function
|
|
30
|
+
export declare function rangeCacheKey(datasetHandle: string, tableId: string, revision: number, schemaVersion: number, range: RangeRequest): string;
|
|
31
|
+
export declare function rangeCacheKeyBelongsToDataset(key: string, datasetHandle: string): boolean;
|
|
32
|
+
export declare function rangeCacheKeyBelongsToTable(key: string, datasetHandle: string, tableId: string): boolean;
|
|
33
|
+
export declare function rangeCacheKeyMatchesVersion(key: string, revision: number, schemaVersion: number): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Main-thread-owned immutable backing for a logical batch.
|
|
36
|
+
*
|
|
37
|
+
* The ArrayBuffers arrive as independently transferable Worker output and are
|
|
38
|
+
* intentionally not cloned here. They remain unreachable through the public
|
|
39
|
+
* batch facade; binary getters perform their own defensive copy.
|
|
40
|
+
*/
|
|
41
|
+
export type BatchBacking = Omit<WireTableBatch, "buffers" | "columns" | "range"> & Readonly<{
|
|
42
|
+
range: Readonly<WireTableBatch["range"]>;
|
|
43
|
+
buffers: readonly ArrayBuffer[];
|
|
44
|
+
columns: readonly WireTableBatchColumn[];
|
|
45
|
+
}>;
|
|
46
|
+
export declare function createBatchBacking(batch: WireTableBatch): BatchBacking;
|
|
28
47
|
export declare function wireBatchByteLength(batch: WireTableBatch): number;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bounded, repeatable byte-range sources.
|
|
3
|
+
*
|
|
4
|
+
* A RangeSource is intentionally a very small host-side capability. The
|
|
5
|
+
* worker never receives the implementation (or a URL); it is given an opaque
|
|
6
|
+
* reader handle by the client and asks the host for bounded byte ranges.
|
|
7
|
+
*/
|
|
8
|
+
/** The largest addressable source (2^32 - 1 bytes). */
|
|
9
|
+
export declare const MAX_RANGE_SOURCE_BYTES = 4294967295;
|
|
10
|
+
/** A half-open byte interval [offset, offset + length). */
|
|
11
|
+
export interface ByteRange {
|
|
12
|
+
readonly offset: number;
|
|
13
|
+
readonly length: number;
|
|
14
|
+
}
|
|
15
|
+
/** A stable identity for one opened view of a source. */
|
|
16
|
+
export interface RangeSourceSnapshot {
|
|
17
|
+
readonly id: string;
|
|
18
|
+
readonly strength: "strong" | "weak";
|
|
19
|
+
}
|
|
20
|
+
/** Options supplied to every reader operation. */
|
|
21
|
+
export interface RangeSourceReadOptions {
|
|
22
|
+
readonly signal: AbortSignal;
|
|
23
|
+
}
|
|
24
|
+
/** A reader returned by a RangeSource.open() call. */
|
|
25
|
+
export interface RangeSourceReader {
|
|
26
|
+
/** Exact source size in bytes. */
|
|
27
|
+
readonly size: number;
|
|
28
|
+
/** Validator captured while opening the source. */
|
|
29
|
+
readonly snapshot: RangeSourceSnapshot;
|
|
30
|
+
/** Maximum number of provider reads that may run concurrently. Defaults to 1. */
|
|
31
|
+
readonly maxConcurrency?: number;
|
|
32
|
+
/** Reads exactly range.length bytes, or rejects. */
|
|
33
|
+
read(range: ByteRange, options: RangeSourceReadOptions): Promise<ArrayBuffer | ArrayBufferView>;
|
|
34
|
+
/** Releases all resources. Calling close more than once is harmless. */
|
|
35
|
+
close(): Promise<void> | void;
|
|
36
|
+
}
|
|
37
|
+
/** Open-time limits owned by the engine. */
|
|
38
|
+
export interface RangeSourceOpenOptions {
|
|
39
|
+
readonly signal: AbortSignal;
|
|
40
|
+
readonly maxSourceBytes: number;
|
|
41
|
+
readonly maxStagingBytes: number;
|
|
42
|
+
}
|
|
43
|
+
/** A repeatably openable source addressed by bounded byte ranges. */
|
|
44
|
+
export interface RangeSource {
|
|
45
|
+
readonly kind: "range";
|
|
46
|
+
readonly name?: string;
|
|
47
|
+
open(options: RangeSourceOpenOptions): Promise<RangeSourceReader>;
|
|
48
|
+
}
|
|
49
|
+
/** Runtime check used at the public engine boundary. */
|
|
50
|
+
export declare function isRangeSource(value: unknown): value is RangeSource;
|
|
51
|
+
/**
|
|
52
|
+
* Validates a byte range without coercing values. Keeping this check in one
|
|
53
|
+
* place prevents unsafe floating-point arithmetic at both HTTP and Worker
|
|
54
|
+
* boundaries.
|
|
55
|
+
*/
|
|
56
|
+
export declare function validateByteRange(range: unknown, size: number): asserts range is ByteRange;
|
|
57
|
+
/** Validates and freezes a reader snapshot. */
|
|
58
|
+
export declare function normalizeRangeSourceSnapshot(value: unknown): RangeSourceSnapshot;
|
|
59
|
+
/** Validates a reader object returned by an adapter/broker. */
|
|
60
|
+
export declare function validateRangeSourceReader(value: unknown): value is RangeSourceReader;
|
|
61
|
+
/** Converts an ArrayBuffer or view to a fresh, exact-length ArrayBuffer. */
|
|
62
|
+
export declare function copyRangeBytes(value: ArrayBuffer | ArrayBufferView): ArrayBuffer;
|
|
63
|
+
/** Returns whether a value is a safe non-negative integer. */
|
|
64
|
+
export declare function isSafeNonNegativeInteger(value: unknown): value is number;
|
package/dist/rpc-client.d.ts
CHANGED
|
@@ -2,17 +2,30 @@ import { TabularkError } from "./errors.js";
|
|
|
2
2
|
import { type Operation, type ProtocolEvent, type ResponseKind } from "./protocol.js";
|
|
3
3
|
type EventListener = (event: ProtocolEvent) => void;
|
|
4
4
|
type FailureListener = (error: TabularkError) => void;
|
|
5
|
+
/** Private messages exchanged by the Worker source-byte broker. */
|
|
6
|
+
export type SourceBrokerListener = (value: unknown) => void;
|
|
5
7
|
interface RequestOptions {
|
|
6
8
|
readonly transfer?: Transferable[];
|
|
7
9
|
readonly signal?: AbortSignal;
|
|
8
10
|
readonly timeoutMs?: number;
|
|
11
|
+
/** Private opt-in operation telemetry callback. */
|
|
12
|
+
readonly measure?: boolean;
|
|
13
|
+
readonly onTelemetry?: (telemetry: OperationTelemetry | undefined) => void;
|
|
14
|
+
}
|
|
15
|
+
export interface OperationTelemetry {
|
|
16
|
+
readonly bytesRead: number;
|
|
17
|
+
readonly peakReservationBytes: number;
|
|
18
|
+
readonly sourceReads: number;
|
|
19
|
+
readonly sourceCacheHitBytes: number;
|
|
9
20
|
}
|
|
10
21
|
/** Main-thread request multiplexer for one dedicated Worker. */
|
|
11
22
|
export declare class WorkerRpcClient {
|
|
12
23
|
#private;
|
|
13
|
-
constructor(worker: Worker, onEvent: EventListener, onFailure?: FailureListener);
|
|
24
|
+
constructor(worker: Worker, onEvent: EventListener, onFailure?: FailureListener, onSourceMessage?: SourceBrokerListener);
|
|
25
|
+
/** Sends one private broker response without exposing the Worker object. */
|
|
26
|
+
postMessage(value: unknown, transfer?: Transferable[]): void;
|
|
14
27
|
request<T>(op: Operation, payload: unknown, expectedKind: ResponseKind, options?: RequestOptions): Promise<T>;
|
|
15
|
-
shutdown(timeoutMs?: number): Promise<void>;
|
|
28
|
+
shutdown(timeoutMs?: number, options?: Pick<RequestOptions, "measure" | "onTelemetry">): Promise<void>;
|
|
16
29
|
terminate(error?: TabularkError, notifyFailure?: boolean): void;
|
|
17
30
|
}
|
|
18
31
|
export {};
|
package/dist/source.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host-side source policy shared by the stable client and its Worker.
|
|
3
|
+
*
|
|
4
|
+
* This is deliberately a binary constant (rather than a decimal "2G" value):
|
|
5
|
+
* the large-source contract is exactly 2 * 1024^3 bytes. Keeping the value
|
|
6
|
+
* in one module prevents the client and Worker from drifting at the boundary.
|
|
7
|
+
*/
|
|
8
|
+
export declare const MAX_LARGE_SOURCE_BYTES: number;
|
|
9
|
+
export { MAX_RANGE_SOURCE_BYTES, isRangeSource, validateByteRange, validateRangeSourceReader, copyRangeBytes, } from "./range-source.js";
|
|
10
|
+
export type { ByteRange, RangeSource, RangeSourceOpenOptions, RangeSourceReader, RangeSourceReadOptions, RangeSourceSnapshot, } from "./range-source.js";
|
|
11
|
+
/** Selects the bounded default path or the large local-Blob path. */
|
|
12
|
+
export type SourceMode = "auto" | "large";
|
|
13
|
+
export declare function isSourceMode(value: unknown): value is SourceMode;
|
|
@@ -35,6 +35,12 @@ export interface CanvasTableViewOptions {
|
|
|
35
35
|
readonly container: HTMLElement;
|
|
36
36
|
readonly table: TableHandle;
|
|
37
37
|
readonly controllerOptions?: CanvasTableViewControllerOptions;
|
|
38
|
+
/**
|
|
39
|
+
* Selects the table palette. `light` is the compatibility default;
|
|
40
|
+
* `auto` follows the browser's `prefers-color-scheme` media query.
|
|
41
|
+
* Forced-colors mode always takes precedence over this setting.
|
|
42
|
+
*/
|
|
43
|
+
readonly colorScheme?: "auto" | "light" | "dark";
|
|
38
44
|
/**
|
|
39
45
|
* Applies static spreadsheet presentation metadata when available.
|
|
40
46
|
* Workbook colors never override the system palette in forced-colors mode.
|
|
@@ -2,6 +2,7 @@ import type { TableHandle } from "../client.js";
|
|
|
2
2
|
import { type CanvasTableTheme } from "./canvas-painter.js";
|
|
3
3
|
import { type TableViewController } from "./controller.js";
|
|
4
4
|
import type { TableControllerOptions } from "./types.js";
|
|
5
|
+
type CanvasColorScheme = "auto" | "light" | "dark";
|
|
5
6
|
export interface CanvasTableViewOptions {
|
|
6
7
|
readonly container: HTMLElement;
|
|
7
8
|
/** Provide either a table or a preconfigured controller, never both. */
|
|
@@ -9,6 +10,12 @@ export interface CanvasTableViewOptions {
|
|
|
9
10
|
/** Provide either a controller or a table, never both. */
|
|
10
11
|
readonly controller?: TableViewController;
|
|
11
12
|
readonly controllerOptions?: TableControllerOptions;
|
|
13
|
+
/**
|
|
14
|
+
* Selects the table palette. `light` is the compatibility default;
|
|
15
|
+
* `auto` follows the browser's `prefers-color-scheme` media query.
|
|
16
|
+
* Forced-colors mode always takes precedence over this setting.
|
|
17
|
+
*/
|
|
18
|
+
readonly colorScheme?: CanvasColorScheme;
|
|
12
19
|
/**
|
|
13
20
|
* Applies static spreadsheet sizing metadata when a TableHandle provides it.
|
|
14
21
|
* Workbook colors never override the system palette in forced-colors mode.
|
|
@@ -30,3 +37,4 @@ export interface CanvasTableView {
|
|
|
30
37
|
}
|
|
31
38
|
/** Mounts an accessible, viewport-driven Canvas preview. */
|
|
32
39
|
export declare function createCanvasTableView(options: CanvasTableViewOptions): CanvasTableView;
|
|
40
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
* Dedicated Arrow IPC runtime artifact implementing adapter ABI
|
|
4
|
+
* Dedicated Arrow IPC runtime artifact implementing adapter ABI v3.
|
|
5
5
|
*/
|
|
6
6
|
export class WasmRuntime {
|
|
7
7
|
free(): void;
|
|
@@ -12,7 +12,8 @@ export class WasmRuntime {
|
|
|
12
12
|
/**
|
|
13
13
|
* Begins an open without copying the full source into WebAssembly.
|
|
14
14
|
*
|
|
15
|
-
* IPC Files request only their trailer, footer, and
|
|
15
|
+
* IPC Files request only their trailer, footer, and batched dictionary/
|
|
16
|
+
* record metadata here.
|
|
16
17
|
* IPC Streams request bounded sequential chunks.
|
|
17
18
|
*/
|
|
18
19
|
beginOpen(options: any, source_length: number): any;
|
|
@@ -37,6 +38,15 @@ export class WasmRuntime {
|
|
|
37
38
|
* Returns no static presentation for Arrow IPC tables.
|
|
38
39
|
*/
|
|
39
40
|
presentation(table_handle: number): any;
|
|
41
|
+
/**
|
|
42
|
+
* Starts and synchronously completes a metadata operation.
|
|
43
|
+
*/
|
|
44
|
+
beginMetadata(table_handle: number): any;
|
|
45
|
+
/**
|
|
46
|
+
* Starts and synchronously completes an open-table operation using the
|
|
47
|
+
* common ABI-v3 step envelope.
|
|
48
|
+
*/
|
|
49
|
+
beginOpenTable(source_handle: number, table_id: string): any;
|
|
40
50
|
/**
|
|
41
51
|
* Cancels and releases a pending adapter operation.
|
|
42
52
|
*/
|
|
@@ -46,10 +56,18 @@ export class WasmRuntime {
|
|
|
46
56
|
*/
|
|
47
57
|
protocolVersion(): number;
|
|
48
58
|
/**
|
|
49
|
-
*
|
|
50
|
-
|
|
59
|
+
* Returns the private adapter-owned resource ledger snapshot.
|
|
60
|
+
*/
|
|
61
|
+
resourceSnapshot(): any;
|
|
62
|
+
/**
|
|
63
|
+
* Starts and synchronously completes a static-presentation operation.
|
|
64
|
+
*/
|
|
65
|
+
beginPresentation(table_handle: number): any;
|
|
66
|
+
/**
|
|
67
|
+
* Supplies one complete revision-matched source result set and advances
|
|
68
|
+
* an open or File range-read operation.
|
|
51
69
|
*/
|
|
52
|
-
continueOperation(operation_handle: number,
|
|
70
|
+
continueOperation(operation_handle: number, operation_revision: number, results: Array<any>): any;
|
|
53
71
|
/**
|
|
54
72
|
* Returns the official adapter ABI version.
|
|
55
73
|
*/
|
|
@@ -62,6 +80,10 @@ export class WasmRuntime {
|
|
|
62
80
|
* Returns no range presentation for Arrow IPC tables.
|
|
63
81
|
*/
|
|
64
82
|
readPresentationRange(table_handle: number, request: any): any;
|
|
83
|
+
/**
|
|
84
|
+
* Starts and synchronously completes a range-presentation operation.
|
|
85
|
+
*/
|
|
86
|
+
beginPresentationRange(table_handle: number, request: any): any;
|
|
65
87
|
/**
|
|
66
88
|
* Creates an empty Arrow adapter runtime.
|
|
67
89
|
*/
|
|
@@ -84,18 +106,23 @@ export interface InitOutput {
|
|
|
84
106
|
readonly wasmruntime_adapterApiVersion: (a: number) => number;
|
|
85
107
|
readonly wasmruntime_adapterId: (a: number, b: number) => void;
|
|
86
108
|
readonly wasmruntime_batchLayoutVersion: (a: number) => number;
|
|
109
|
+
readonly wasmruntime_beginMetadata: (a: number, b: number, c: number) => void;
|
|
87
110
|
readonly wasmruntime_beginOpen: (a: number, b: number, c: number, d: number) => void;
|
|
111
|
+
readonly wasmruntime_beginOpenTable: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
112
|
+
readonly wasmruntime_beginPresentation: (a: number, b: number, c: number) => void;
|
|
113
|
+
readonly wasmruntime_beginPresentationRange: (a: number, b: number, c: number, d: number) => void;
|
|
88
114
|
readonly wasmruntime_beginRead: (a: number, b: number, c: number, d: number) => void;
|
|
89
115
|
readonly wasmruntime_cancelOperation: (a: number, b: number) => number;
|
|
90
116
|
readonly wasmruntime_closeSource: (a: number, b: number) => number;
|
|
91
117
|
readonly wasmruntime_closeTable: (a: number, b: number) => number;
|
|
92
|
-
readonly wasmruntime_continueOperation: (a: number, b: number, c: number, d: number, e: number
|
|
118
|
+
readonly wasmruntime_continueOperation: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
93
119
|
readonly wasmruntime_metadata: (a: number, b: number, c: number) => void;
|
|
94
120
|
readonly wasmruntime_new: (a: number, b: number) => void;
|
|
95
121
|
readonly wasmruntime_openTable: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
96
122
|
readonly wasmruntime_presentation: (a: number, b: number, c: number) => void;
|
|
97
123
|
readonly wasmruntime_protocolVersion: (a: number) => number;
|
|
98
124
|
readonly wasmruntime_readPresentationRange: (a: number, b: number, c: number, d: number) => void;
|
|
125
|
+
readonly wasmruntime_resourceSnapshot: (a: number, b: number) => void;
|
|
99
126
|
readonly wasmruntime_shutdown: (a: number) => void;
|
|
100
127
|
readonly __wbindgen_export_0: (a: number, b: number) => number;
|
|
101
128
|
readonly __wbindgen_export_1: (a: number, b: number, c: number, d: number) => number;
|
|
@@ -91,6 +91,14 @@ function addHeapObject(obj) {
|
|
|
91
91
|
return idx;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
function handleError(f, args) {
|
|
95
|
+
try {
|
|
96
|
+
return f.apply(this, args);
|
|
97
|
+
} catch (e) {
|
|
98
|
+
wasm.__wbindgen_export_2(addHeapObject(e));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
94
102
|
function dropObject(idx) {
|
|
95
103
|
if (idx < 132) return;
|
|
96
104
|
heap[idx] = heap_next;
|
|
@@ -103,14 +111,6 @@ function takeObject(idx) {
|
|
|
103
111
|
return ret;
|
|
104
112
|
}
|
|
105
113
|
|
|
106
|
-
function handleError(f, args) {
|
|
107
|
-
try {
|
|
108
|
-
return f.apply(this, args);
|
|
109
|
-
} catch (e) {
|
|
110
|
-
wasm.__wbindgen_export_2(addHeapObject(e));
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
114
|
function isLikeNone(x) {
|
|
115
115
|
return x === undefined || x === null;
|
|
116
116
|
}
|
|
@@ -193,7 +193,7 @@ const WasmRuntimeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
193
193
|
? { register: () => {}, unregister: () => {} }
|
|
194
194
|
: new FinalizationRegistry(ptr => wasm.__wbg_wasmruntime_free(ptr >>> 0, 1));
|
|
195
195
|
/**
|
|
196
|
-
* Dedicated Arrow IPC runtime artifact implementing adapter ABI
|
|
196
|
+
* Dedicated Arrow IPC runtime artifact implementing adapter ABI v3.
|
|
197
197
|
*/
|
|
198
198
|
export class WasmRuntime {
|
|
199
199
|
|
|
@@ -231,7 +231,8 @@ export class WasmRuntime {
|
|
|
231
231
|
/**
|
|
232
232
|
* Begins an open without copying the full source into WebAssembly.
|
|
233
233
|
*
|
|
234
|
-
* IPC Files request only their trailer, footer, and
|
|
234
|
+
* IPC Files request only their trailer, footer, and batched dictionary/
|
|
235
|
+
* record metadata here.
|
|
235
236
|
* IPC Streams request bounded sequential chunks.
|
|
236
237
|
* @param {any} options
|
|
237
238
|
* @param {number} source_length
|
|
@@ -335,6 +336,50 @@ export class WasmRuntime {
|
|
|
335
336
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
336
337
|
}
|
|
337
338
|
}
|
|
339
|
+
/**
|
|
340
|
+
* Starts and synchronously completes a metadata operation.
|
|
341
|
+
* @param {number} table_handle
|
|
342
|
+
* @returns {any}
|
|
343
|
+
*/
|
|
344
|
+
beginMetadata(table_handle) {
|
|
345
|
+
try {
|
|
346
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
347
|
+
wasm.wasmruntime_beginMetadata(retptr, this.__wbg_ptr, table_handle);
|
|
348
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
349
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
350
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
351
|
+
if (r2) {
|
|
352
|
+
throw takeObject(r1);
|
|
353
|
+
}
|
|
354
|
+
return takeObject(r0);
|
|
355
|
+
} finally {
|
|
356
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Starts and synchronously completes an open-table operation using the
|
|
361
|
+
* common ABI-v3 step envelope.
|
|
362
|
+
* @param {number} source_handle
|
|
363
|
+
* @param {string} table_id
|
|
364
|
+
* @returns {any}
|
|
365
|
+
*/
|
|
366
|
+
beginOpenTable(source_handle, table_id) {
|
|
367
|
+
try {
|
|
368
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
369
|
+
const ptr0 = passStringToWasm0(table_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
370
|
+
const len0 = WASM_VECTOR_LEN;
|
|
371
|
+
wasm.wasmruntime_beginOpenTable(retptr, this.__wbg_ptr, source_handle, ptr0, len0);
|
|
372
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
373
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
374
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
375
|
+
if (r2) {
|
|
376
|
+
throw takeObject(r1);
|
|
377
|
+
}
|
|
378
|
+
return takeObject(r0);
|
|
379
|
+
} finally {
|
|
380
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
338
383
|
/**
|
|
339
384
|
* Cancels and releases a pending adapter operation.
|
|
340
385
|
* @param {number} operation_handle
|
|
@@ -353,18 +398,56 @@ export class WasmRuntime {
|
|
|
353
398
|
return ret >>> 0;
|
|
354
399
|
}
|
|
355
400
|
/**
|
|
356
|
-
*
|
|
357
|
-
*
|
|
401
|
+
* Returns the private adapter-owned resource ledger snapshot.
|
|
402
|
+
* @returns {any}
|
|
403
|
+
*/
|
|
404
|
+
resourceSnapshot() {
|
|
405
|
+
try {
|
|
406
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
407
|
+
wasm.wasmruntime_resourceSnapshot(retptr, this.__wbg_ptr);
|
|
408
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
409
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
410
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
411
|
+
if (r2) {
|
|
412
|
+
throw takeObject(r1);
|
|
413
|
+
}
|
|
414
|
+
return takeObject(r0);
|
|
415
|
+
} finally {
|
|
416
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Starts and synchronously completes a static-presentation operation.
|
|
421
|
+
* @param {number} table_handle
|
|
422
|
+
* @returns {any}
|
|
423
|
+
*/
|
|
424
|
+
beginPresentation(table_handle) {
|
|
425
|
+
try {
|
|
426
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
427
|
+
wasm.wasmruntime_beginPresentation(retptr, this.__wbg_ptr, table_handle);
|
|
428
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
429
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
430
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
431
|
+
if (r2) {
|
|
432
|
+
throw takeObject(r1);
|
|
433
|
+
}
|
|
434
|
+
return takeObject(r0);
|
|
435
|
+
} finally {
|
|
436
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Supplies one complete revision-matched source result set and advances
|
|
441
|
+
* an open or File range-read operation.
|
|
358
442
|
* @param {number} operation_handle
|
|
359
|
-
* @param {number}
|
|
360
|
-
* @param {
|
|
361
|
-
* @param {boolean} eof
|
|
443
|
+
* @param {number} operation_revision
|
|
444
|
+
* @param {Array<any>} results
|
|
362
445
|
* @returns {any}
|
|
363
446
|
*/
|
|
364
|
-
continueOperation(operation_handle,
|
|
447
|
+
continueOperation(operation_handle, operation_revision, results) {
|
|
365
448
|
try {
|
|
366
449
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
367
|
-
wasm.wasmruntime_continueOperation(retptr, this.__wbg_ptr, operation_handle,
|
|
450
|
+
wasm.wasmruntime_continueOperation(retptr, this.__wbg_ptr, operation_handle, operation_revision, addHeapObject(results));
|
|
368
451
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
369
452
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
370
453
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -413,6 +496,27 @@ export class WasmRuntime {
|
|
|
413
496
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
414
497
|
}
|
|
415
498
|
}
|
|
499
|
+
/**
|
|
500
|
+
* Starts and synchronously completes a range-presentation operation.
|
|
501
|
+
* @param {number} table_handle
|
|
502
|
+
* @param {any} request
|
|
503
|
+
* @returns {any}
|
|
504
|
+
*/
|
|
505
|
+
beginPresentationRange(table_handle, request) {
|
|
506
|
+
try {
|
|
507
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
508
|
+
wasm.wasmruntime_beginPresentationRange(retptr, this.__wbg_ptr, table_handle, addHeapObject(request));
|
|
509
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
510
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
511
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
512
|
+
if (r2) {
|
|
513
|
+
throw takeObject(r1);
|
|
514
|
+
}
|
|
515
|
+
return takeObject(r0);
|
|
516
|
+
} finally {
|
|
517
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
416
520
|
/**
|
|
417
521
|
* Creates an empty Arrow adapter runtime.
|
|
418
522
|
* @param {any} config
|
|
@@ -507,10 +611,18 @@ function __wbg_get_imports() {
|
|
|
507
611
|
const ret = getObject(arg0).buffer;
|
|
508
612
|
return addHeapObject(ret);
|
|
509
613
|
};
|
|
614
|
+
imports.wbg.__wbg_byteLength_ea52ac3de882b483 = function(arg0) {
|
|
615
|
+
const ret = getObject(arg0).byteLength;
|
|
616
|
+
return ret;
|
|
617
|
+
};
|
|
510
618
|
imports.wbg.__wbg_entries_3265d4158b33e5dc = function(arg0) {
|
|
511
619
|
const ret = Object.entries(getObject(arg0));
|
|
512
620
|
return addHeapObject(ret);
|
|
513
621
|
};
|
|
622
|
+
imports.wbg.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
|
|
623
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
624
|
+
return addHeapObject(ret);
|
|
625
|
+
}, arguments) };
|
|
514
626
|
imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
|
|
515
627
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
516
628
|
return addHeapObject(ret);
|
|
Binary file
|
|
@@ -5,18 +5,23 @@ export const __wbg_wasmruntime_free: (a: number, b: number) => void;
|
|
|
5
5
|
export const wasmruntime_adapterApiVersion: (a: number) => number;
|
|
6
6
|
export const wasmruntime_adapterId: (a: number, b: number) => void;
|
|
7
7
|
export const wasmruntime_batchLayoutVersion: (a: number) => number;
|
|
8
|
+
export const wasmruntime_beginMetadata: (a: number, b: number, c: number) => void;
|
|
8
9
|
export const wasmruntime_beginOpen: (a: number, b: number, c: number, d: number) => void;
|
|
10
|
+
export const wasmruntime_beginOpenTable: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
11
|
+
export const wasmruntime_beginPresentation: (a: number, b: number, c: number) => void;
|
|
12
|
+
export const wasmruntime_beginPresentationRange: (a: number, b: number, c: number, d: number) => void;
|
|
9
13
|
export const wasmruntime_beginRead: (a: number, b: number, c: number, d: number) => void;
|
|
10
14
|
export const wasmruntime_cancelOperation: (a: number, b: number) => number;
|
|
11
15
|
export const wasmruntime_closeSource: (a: number, b: number) => number;
|
|
12
16
|
export const wasmruntime_closeTable: (a: number, b: number) => number;
|
|
13
|
-
export const wasmruntime_continueOperation: (a: number, b: number, c: number, d: number, e: number
|
|
17
|
+
export const wasmruntime_continueOperation: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
14
18
|
export const wasmruntime_metadata: (a: number, b: number, c: number) => void;
|
|
15
19
|
export const wasmruntime_new: (a: number, b: number) => void;
|
|
16
20
|
export const wasmruntime_openTable: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
17
21
|
export const wasmruntime_presentation: (a: number, b: number, c: number) => void;
|
|
18
22
|
export const wasmruntime_protocolVersion: (a: number) => number;
|
|
19
23
|
export const wasmruntime_readPresentationRange: (a: number, b: number, c: number, d: number) => void;
|
|
24
|
+
export const wasmruntime_resourceSnapshot: (a: number, b: number) => void;
|
|
20
25
|
export const wasmruntime_shutdown: (a: number) => void;
|
|
21
26
|
export const __wbindgen_export_0: (a: number, b: number) => number;
|
|
22
27
|
export const __wbindgen_export_1: (a: number, b: number, c: number, d: number) => number;
|
|
@@ -41,6 +41,15 @@ export class WasmRuntime {
|
|
|
41
41
|
* Returns no static presentation for delimited text tables.
|
|
42
42
|
*/
|
|
43
43
|
presentation(table_handle: number): any;
|
|
44
|
+
/**
|
|
45
|
+
* Starts and synchronously completes a metadata operation.
|
|
46
|
+
*/
|
|
47
|
+
beginMetadata(table_handle: number): any;
|
|
48
|
+
/**
|
|
49
|
+
* Starts and synchronously completes an open-table operation using the
|
|
50
|
+
* common ABI-v3 step envelope.
|
|
51
|
+
*/
|
|
52
|
+
beginOpenTable(source_handle: number, table_id: string): any;
|
|
44
53
|
/**
|
|
45
54
|
* Cancels and releases a pending open or read operation.
|
|
46
55
|
*/
|
|
@@ -50,12 +59,20 @@ export class WasmRuntime {
|
|
|
50
59
|
*/
|
|
51
60
|
protocolVersion(): number;
|
|
52
61
|
/**
|
|
53
|
-
*
|
|
54
|
-
|
|
62
|
+
* Returns the private adapter-owned resource ledger snapshot.
|
|
63
|
+
*/
|
|
64
|
+
resourceSnapshot(): any;
|
|
65
|
+
/**
|
|
66
|
+
* Starts and synchronously completes a static-presentation operation.
|
|
67
|
+
*/
|
|
68
|
+
beginPresentation(table_handle: number): any;
|
|
69
|
+
/**
|
|
70
|
+
* Supplies a complete, revision-matched result set and advances an open
|
|
71
|
+
* or range-read operation.
|
|
55
72
|
*/
|
|
56
|
-
continueOperation(operation_handle: number,
|
|
73
|
+
continueOperation(operation_handle: number, operation_revision: number, results: Array<any>): any;
|
|
57
74
|
/**
|
|
58
|
-
* Returns official adapter ABI version
|
|
75
|
+
* Returns official adapter ABI version three.
|
|
59
76
|
*/
|
|
60
77
|
adapterApiVersion(): number;
|
|
61
78
|
/**
|
|
@@ -66,6 +83,10 @@ export class WasmRuntime {
|
|
|
66
83
|
* Returns no range presentation for delimited text tables.
|
|
67
84
|
*/
|
|
68
85
|
readPresentationRange(table_handle: number, request: any): any;
|
|
86
|
+
/**
|
|
87
|
+
* Starts and synchronously completes a range-presentation operation.
|
|
88
|
+
*/
|
|
89
|
+
beginPresentationRange(table_handle: number, request: any): any;
|
|
69
90
|
/**
|
|
70
91
|
* Creates a runtime from a camel-case [`RuntimeConfig`] object.
|
|
71
92
|
*/
|
|
@@ -89,18 +110,23 @@ export interface InitOutput {
|
|
|
89
110
|
readonly wasmruntime_adapterApiVersion: (a: number) => number;
|
|
90
111
|
readonly wasmruntime_adapterId: (a: number, b: number) => void;
|
|
91
112
|
readonly wasmruntime_batchLayoutVersion: (a: number) => number;
|
|
113
|
+
readonly wasmruntime_beginMetadata: (a: number, b: number, c: number) => void;
|
|
92
114
|
readonly wasmruntime_beginOpen: (a: number, b: number, c: number, d: number) => void;
|
|
115
|
+
readonly wasmruntime_beginOpenTable: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
116
|
+
readonly wasmruntime_beginPresentation: (a: number, b: number, c: number) => void;
|
|
117
|
+
readonly wasmruntime_beginPresentationRange: (a: number, b: number, c: number, d: number) => void;
|
|
93
118
|
readonly wasmruntime_beginRead: (a: number, b: number, c: number, d: number) => void;
|
|
94
119
|
readonly wasmruntime_cancelOperation: (a: number, b: number) => number;
|
|
95
120
|
readonly wasmruntime_closeSource: (a: number, b: number) => number;
|
|
96
121
|
readonly wasmruntime_closeTable: (a: number, b: number) => number;
|
|
97
|
-
readonly wasmruntime_continueOperation: (a: number, b: number, c: number, d: number, e: number
|
|
122
|
+
readonly wasmruntime_continueOperation: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
98
123
|
readonly wasmruntime_metadata: (a: number, b: number, c: number) => void;
|
|
99
124
|
readonly wasmruntime_new: (a: number, b: number) => void;
|
|
100
125
|
readonly wasmruntime_openTable: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
101
126
|
readonly wasmruntime_presentation: (a: number, b: number, c: number) => void;
|
|
102
127
|
readonly wasmruntime_protocolVersion: (a: number) => number;
|
|
103
128
|
readonly wasmruntime_readPresentationRange: (a: number, b: number, c: number, d: number) => void;
|
|
129
|
+
readonly wasmruntime_resourceSnapshot: (a: number, b: number) => void;
|
|
104
130
|
readonly wasmruntime_shutdown: (a: number) => void;
|
|
105
131
|
readonly __wbindgen_export_0: (a: number, b: number) => number;
|
|
106
132
|
readonly __wbindgen_export_1: (a: number, b: number, c: number, d: number) => number;
|