hyperdb-wasm 0.0.27099-dev.wasm.g3764e520 → 0.0.27104-dev.wasm.g1f6020b7
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/api.d.ts +7 -16
- package/dist/browser.js +280 -12072
- package/dist/browser_worker.js +0 -30
- package/dist/client.d.ts +0 -3
- package/dist/hyperdb-wasm.cjs +1 -1
- package/dist/hyperdb-wasm.js +1 -1
- package/dist/hyperdb-wasm.wasm.br +0 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.node.d.ts +1 -1
- package/dist/node.js +280 -12241
- package/dist/node_worker.js +1 -40
- package/dist/protocol.d.ts +0 -17
- package/dist/raw.browser.js +0 -30
- package/dist/raw.node.js +0 -30
- package/dist/wasm_bindings.d.ts +0 -5
- package/dist/worker_setup.d.ts +0 -1
- package/examples/browser-attached-databases.html +10 -0
- package/examples/browser.html +10 -0
- package/examples/node.mjs +5 -9
- package/examples/serve.mjs +1 -0
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -10,9 +10,6 @@ export interface HyperDBClient {
|
|
|
10
10
|
connect(): Promise<WasmResult>;
|
|
11
11
|
disconnect(connection: number): Promise<WasmResult>;
|
|
12
12
|
startQuery(connection: number, sql: string): Promise<WasmResult>;
|
|
13
|
-
insertArrowIPCFromPath(connection: number, path: string, name: string, schema: string | null, create: boolean, internal?: boolean): Promise<WasmResult>;
|
|
14
|
-
createTemporaryFile(bytes: Uint8Array): Promise<WasmResult>;
|
|
15
|
-
removeFile(path: string): Promise<WasmResult>;
|
|
16
13
|
mount(source: MountSource, path: string, mode: MountAccessMode): Promise<WasmResult>;
|
|
17
14
|
unmount(path: string): Promise<WasmResult>;
|
|
18
15
|
pollQuery(query: number): Promise<WasmResult>;
|
|
@@ -21,10 +18,8 @@ export interface HyperDBClient {
|
|
|
21
18
|
shutdown(): Promise<WasmResult>;
|
|
22
19
|
terminate(): Promise<void>;
|
|
23
20
|
}
|
|
24
|
-
export interface
|
|
25
|
-
readonly
|
|
26
|
-
readonly schema?: string;
|
|
27
|
-
readonly create?: boolean;
|
|
21
|
+
export interface QueryOptions {
|
|
22
|
+
readonly signal?: AbortSignal;
|
|
28
23
|
}
|
|
29
24
|
export type MountAccessMode = 'read' | 'readwrite';
|
|
30
25
|
export interface MountOptions {
|
|
@@ -113,20 +108,16 @@ export declare class HyperDBConnection {
|
|
|
113
108
|
private closing;
|
|
114
109
|
constructor(client: HyperDBClient, connection: number, onClose?: () => void);
|
|
115
110
|
close(): Promise<void>;
|
|
116
|
-
queryStreamIPC(sql: string): QueryStreamIPC;
|
|
117
|
-
queryIPC(sql: string): QueryPromise<Uint8Array>;
|
|
111
|
+
queryStreamIPC(sql: string, options?: QueryOptions): QueryStreamIPC;
|
|
112
|
+
queryIPC(sql: string, options?: QueryOptions): QueryPromise<Uint8Array>;
|
|
118
113
|
queryStream<T extends TypeMap = {
|
|
119
114
|
[key: string]: DataType;
|
|
120
|
-
}>(sql: string): QueryPromise<AsyncRecordBatchStreamReader<T>>;
|
|
115
|
+
}>(sql: string, options?: QueryOptions): QueryPromise<AsyncRecordBatchStreamReader<T>>;
|
|
121
116
|
query<T extends TypeMap = {
|
|
122
117
|
[key: string]: DataType;
|
|
123
|
-
}>(sql: string): QueryPromise<Table<T>>;
|
|
124
|
-
execute(sql: string): QueryPromise<bigint | null>;
|
|
125
|
-
insertArrowTable(table: Table, options: ArrowInsertOptions): Promise<void>;
|
|
126
|
-
insertArrowIPCFromPath(path: string, options: ArrowInsertOptions): Promise<void>;
|
|
127
|
-
private insertArrowIPCFromPathInternal;
|
|
118
|
+
}>(sql: string, options?: QueryOptions): QueryPromise<Table<T>>;
|
|
119
|
+
execute(sql: string, options?: QueryOptions): QueryPromise<bigint | null>;
|
|
128
120
|
private ensureAvailable;
|
|
129
|
-
private finishQuery;
|
|
130
121
|
closeForTermination(): Promise<void>;
|
|
131
122
|
}
|
|
132
123
|
export type { HyperDBEngineClient };
|