jazz-wasm 2.0.0-alpha.2
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/package.json +29 -0
- package/pkg/jazz_wasm.d.ts +473 -0
- package/pkg/jazz_wasm.js +1844 -0
- package/pkg/jazz_wasm_bg.wasm +0 -0
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "jazz-wasm",
|
|
3
|
+
"version": "2.0.0-alpha.2",
|
|
4
|
+
"description": "WebAssembly bindings for the Jazz database engine",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"crdt",
|
|
7
|
+
"database",
|
|
8
|
+
"local-first",
|
|
9
|
+
"wasm"
|
|
10
|
+
],
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/garden-co/jazz"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"pkg/jazz_wasm_bg.wasm",
|
|
18
|
+
"pkg/jazz_wasm.js",
|
|
19
|
+
"pkg/jazz_wasm.d.ts"
|
|
20
|
+
],
|
|
21
|
+
"main": "pkg/jazz_wasm.js",
|
|
22
|
+
"types": "pkg/jazz_wasm.d.ts",
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"wasm-pack": "^0.14.0"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "wasm-pack build --target web --profiling"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export interface WasmColumnDescriptor {
|
|
4
|
+
name: string;
|
|
5
|
+
column_type: WasmColumnType;
|
|
6
|
+
nullable: boolean;
|
|
7
|
+
references?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface WasmOperationPolicy {
|
|
11
|
+
using?: WasmPolicyExpr;
|
|
12
|
+
with_check?: WasmPolicyExpr;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface WasmRow {
|
|
16
|
+
id: string;
|
|
17
|
+
values: WasmValue[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface WasmRowDelta {
|
|
21
|
+
added: WasmRow[];
|
|
22
|
+
removed: WasmRow[];
|
|
23
|
+
updated: [WasmRow, WasmRow][];
|
|
24
|
+
pending: boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface WasmSchema {
|
|
28
|
+
tables: Record<string, WasmTableSchema>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface WasmTablePolicies {
|
|
32
|
+
select?: WasmOperationPolicy;
|
|
33
|
+
insert?: WasmOperationPolicy;
|
|
34
|
+
update?: WasmOperationPolicy;
|
|
35
|
+
delete?: WasmOperationPolicy;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface WasmTableSchema {
|
|
39
|
+
columns: WasmColumnDescriptor[];
|
|
40
|
+
policies?: WasmTablePolicies;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type WasmCmpOp = "Eq" | "Ne" | "Lt" | "Le" | "Gt" | "Ge";
|
|
44
|
+
|
|
45
|
+
export type WasmColumnType = { type: "Integer" } | { type: "BigInt" } | { type: "Boolean" } | { type: "Text" } | { type: "Enum"; variants: string[] } | { type: "Timestamp" } | { type: "Uuid" } | { type: "Array"; element: WasmColumnType } | { type: "Row"; columns: WasmColumnDescriptor[] };
|
|
46
|
+
|
|
47
|
+
export type WasmPolicyExpr = { type: "Cmp"; column: string; op: WasmCmpOp; value: WasmPolicyValue } | { type: "IsNull"; column: string } | { type: "IsNotNull"; column: string } | { type: "In"; column: string; session_path: string[] } | { type: "Exists"; table: string; condition: WasmPolicyExpr } | { type: "ExistsRel"; rel: any } | { type: "Inherits"; operation: WasmPolicyOperation; via_column: string; max_depth?: number } | { type: "And"; exprs: WasmPolicyExpr[] } | { type: "Or"; exprs: WasmPolicyExpr[] } | { type: "Not"; expr: WasmPolicyExpr } | { type: "True" } | { type: "False" };
|
|
48
|
+
|
|
49
|
+
export type WasmPolicyOperation = "Select" | "Insert" | "Update" | "Delete";
|
|
50
|
+
|
|
51
|
+
export type WasmPolicyValue = { type: "Literal"; value: WasmValue } | { type: "SessionRef"; path: string[] };
|
|
52
|
+
|
|
53
|
+
export type WasmValue = { type: "Integer"; value: number } | { type: "BigInt"; value: number } | { type: "Boolean"; value: boolean } | { type: "Text"; value: string } | { type: "Timestamp"; value: number } | { type: "Uuid"; value: string } | { type: "Array"; value: WasmValue[] } | { type: "Row"; value: WasmValue[] } | { type: "Null" };
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* WASM-exposed QueryBuilder with camelCase methods.
|
|
58
|
+
*/
|
|
59
|
+
export class WasmQueryBuilder {
|
|
60
|
+
free(): void;
|
|
61
|
+
[Symbol.dispose](): void;
|
|
62
|
+
/**
|
|
63
|
+
* Set a table alias.
|
|
64
|
+
*/
|
|
65
|
+
alias(alias: string): WasmQueryBuilder;
|
|
66
|
+
/**
|
|
67
|
+
* Set the branch to query.
|
|
68
|
+
*/
|
|
69
|
+
branch(branch: string): WasmQueryBuilder;
|
|
70
|
+
/**
|
|
71
|
+
* Set multiple branches to query.
|
|
72
|
+
*/
|
|
73
|
+
branches(branches: string[]): WasmQueryBuilder;
|
|
74
|
+
/**
|
|
75
|
+
* Build the query and return as JSON string.
|
|
76
|
+
*/
|
|
77
|
+
build(): string;
|
|
78
|
+
/**
|
|
79
|
+
* Build and return as JsValue.
|
|
80
|
+
*/
|
|
81
|
+
buildJs(): any;
|
|
82
|
+
/**
|
|
83
|
+
* Add an equals filter.
|
|
84
|
+
*/
|
|
85
|
+
filterEq(column: string, value: any): WasmQueryBuilder;
|
|
86
|
+
/**
|
|
87
|
+
* Add a greater-than-or-equal filter.
|
|
88
|
+
*/
|
|
89
|
+
filterGe(column: string, value: any): WasmQueryBuilder;
|
|
90
|
+
/**
|
|
91
|
+
* Add a greater-than filter.
|
|
92
|
+
*/
|
|
93
|
+
filterGt(column: string, value: any): WasmQueryBuilder;
|
|
94
|
+
/**
|
|
95
|
+
* Add a less-than-or-equal filter.
|
|
96
|
+
*/
|
|
97
|
+
filterLe(column: string, value: any): WasmQueryBuilder;
|
|
98
|
+
/**
|
|
99
|
+
* Add a less-than filter.
|
|
100
|
+
*/
|
|
101
|
+
filterLt(column: string, value: any): WasmQueryBuilder;
|
|
102
|
+
/**
|
|
103
|
+
* Add a not-equals filter.
|
|
104
|
+
*/
|
|
105
|
+
filterNe(column: string, value: any): WasmQueryBuilder;
|
|
106
|
+
/**
|
|
107
|
+
* Include soft-deleted rows.
|
|
108
|
+
*/
|
|
109
|
+
includeDeleted(): WasmQueryBuilder;
|
|
110
|
+
/**
|
|
111
|
+
* Join another table.
|
|
112
|
+
*/
|
|
113
|
+
join(table: string): WasmQueryBuilder;
|
|
114
|
+
/**
|
|
115
|
+
* Set a limit.
|
|
116
|
+
*/
|
|
117
|
+
limit(n: number): WasmQueryBuilder;
|
|
118
|
+
/**
|
|
119
|
+
* Create a new QueryBuilder for a table.
|
|
120
|
+
*/
|
|
121
|
+
constructor(table: string);
|
|
122
|
+
/**
|
|
123
|
+
* Set an offset.
|
|
124
|
+
*/
|
|
125
|
+
offset(n: number): WasmQueryBuilder;
|
|
126
|
+
/**
|
|
127
|
+
* Specify join condition.
|
|
128
|
+
*/
|
|
129
|
+
on(left_col: string, right_col: string): WasmQueryBuilder;
|
|
130
|
+
/**
|
|
131
|
+
* Start a new OR branch.
|
|
132
|
+
*/
|
|
133
|
+
or(): WasmQueryBuilder;
|
|
134
|
+
/**
|
|
135
|
+
* Add ascending order by.
|
|
136
|
+
*/
|
|
137
|
+
orderBy(column: string): WasmQueryBuilder;
|
|
138
|
+
/**
|
|
139
|
+
* Add descending order by.
|
|
140
|
+
*/
|
|
141
|
+
orderByDesc(column: string): WasmQueryBuilder;
|
|
142
|
+
/**
|
|
143
|
+
* Select specific columns.
|
|
144
|
+
*/
|
|
145
|
+
select(columns: string[]): WasmQueryBuilder;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Main runtime for JavaScript applications.
|
|
150
|
+
*
|
|
151
|
+
* Wraps `Rc<RefCell<WasmCoreType>>`.
|
|
152
|
+
* All methods borrow the core, call RuntimeCore, and return.
|
|
153
|
+
* Async scheduling happens via WasmScheduler.schedule_batched_tick().
|
|
154
|
+
*/
|
|
155
|
+
export class WasmRuntime {
|
|
156
|
+
free(): void;
|
|
157
|
+
[Symbol.dispose](): void;
|
|
158
|
+
/**
|
|
159
|
+
* Add a client connection (for server-side use in tests).
|
|
160
|
+
*/
|
|
161
|
+
addClient(): string;
|
|
162
|
+
/**
|
|
163
|
+
* Add a server connection.
|
|
164
|
+
*
|
|
165
|
+
* After adding the server, immediately flushes the outbox so that
|
|
166
|
+
* catalogue sync messages (from queue_full_sync_to_server) are sent
|
|
167
|
+
* before the call returns, rather than being deferred to a microtask.
|
|
168
|
+
*/
|
|
169
|
+
addServer(): void;
|
|
170
|
+
/**
|
|
171
|
+
* Delete a row by ObjectId.
|
|
172
|
+
*/
|
|
173
|
+
delete(object_id: string): void;
|
|
174
|
+
/**
|
|
175
|
+
* Delete a row and return a Promise that resolves when the tier acks.
|
|
176
|
+
*/
|
|
177
|
+
deleteWithAck(object_id: string, tier: string): Promise<any>;
|
|
178
|
+
/**
|
|
179
|
+
* Flush all data to persistent storage (snapshot).
|
|
180
|
+
*/
|
|
181
|
+
flush(): void;
|
|
182
|
+
/**
|
|
183
|
+
* Flush only the WAL buffer to OPFS (not the snapshot).
|
|
184
|
+
*/
|
|
185
|
+
flushWal(): void;
|
|
186
|
+
/**
|
|
187
|
+
* Get the current schema as JSON.
|
|
188
|
+
*/
|
|
189
|
+
getSchema(): any;
|
|
190
|
+
/**
|
|
191
|
+
* Get the canonical schema hash (64-char hex).
|
|
192
|
+
*/
|
|
193
|
+
getSchemaHash(): string;
|
|
194
|
+
/**
|
|
195
|
+
* Insert a row into a table.
|
|
196
|
+
*
|
|
197
|
+
* # Returns
|
|
198
|
+
* The new row's ObjectId as a UUID string.
|
|
199
|
+
*/
|
|
200
|
+
insert(table: string, values: any): string;
|
|
201
|
+
/**
|
|
202
|
+
* Insert a row and return a Promise that resolves when the tier acks.
|
|
203
|
+
*
|
|
204
|
+
* `tier` must be one of: "worker", "edge", "core".
|
|
205
|
+
*/
|
|
206
|
+
insertWithAck(table: string, values: any, tier: string): Promise<any>;
|
|
207
|
+
/**
|
|
208
|
+
* Create a new WasmRuntime.
|
|
209
|
+
*
|
|
210
|
+
* Storage is synchronous (in-memory via MemoryStorage).
|
|
211
|
+
*
|
|
212
|
+
* # Arguments
|
|
213
|
+
* * `schema_json` - JSON-encoded schema definition
|
|
214
|
+
* * `app_id` - Application identifier
|
|
215
|
+
* * `env` - Environment (e.g., "dev", "prod")
|
|
216
|
+
* * `user_branch` - User's branch name (e.g., "main")
|
|
217
|
+
* * `tier` - Optional persistence tier ("worker", "edge", "core").
|
|
218
|
+
* Set for server nodes to enable ack emission.
|
|
219
|
+
*/
|
|
220
|
+
constructor(schema_json: string, app_id: string, env: string, user_branch: string, tier?: string | null);
|
|
221
|
+
/**
|
|
222
|
+
* Called by JS when a sync message arrives from the server.
|
|
223
|
+
*
|
|
224
|
+
* # Arguments
|
|
225
|
+
* * `message_json` - JSON-encoded SyncPayload
|
|
226
|
+
*/
|
|
227
|
+
onSyncMessageReceived(message_json: string): void;
|
|
228
|
+
/**
|
|
229
|
+
* Called by JS when a sync message arrives from a client (not a server).
|
|
230
|
+
*
|
|
231
|
+
* # Arguments
|
|
232
|
+
* * `client_id` - UUID string of the sending client
|
|
233
|
+
* * `message_json` - JSON-encoded SyncPayload
|
|
234
|
+
*/
|
|
235
|
+
onSyncMessageReceivedFromClient(client_id: string, message_json: string): void;
|
|
236
|
+
/**
|
|
237
|
+
* Register a callback for outgoing sync messages.
|
|
238
|
+
*/
|
|
239
|
+
onSyncMessageToSend(callback: Function): void;
|
|
240
|
+
/**
|
|
241
|
+
* Create a persistent WasmRuntime backed by OPFS.
|
|
242
|
+
*
|
|
243
|
+
* Opens a single OPFS file namespace and restores state from the latest
|
|
244
|
+
* durable checkpoint.
|
|
245
|
+
*/
|
|
246
|
+
static openPersistent(schema_json: string, app_id: string, env: string, user_branch: string, db_name: string, tier?: string | null): Promise<WasmRuntime>;
|
|
247
|
+
/**
|
|
248
|
+
* Execute a query and return results as a Promise.
|
|
249
|
+
*
|
|
250
|
+
* Optional `settled_tier` holds delivery until the tier confirms.
|
|
251
|
+
*/
|
|
252
|
+
query(query_json: string, session_json?: string | null, settled_tier?: string | null): Promise<any>;
|
|
253
|
+
/**
|
|
254
|
+
* Remove the current upstream server connection.
|
|
255
|
+
*/
|
|
256
|
+
removeServer(): void;
|
|
257
|
+
/**
|
|
258
|
+
* Set a client's role.
|
|
259
|
+
*
|
|
260
|
+
* # Arguments
|
|
261
|
+
* * `client_id` - UUID string of the client
|
|
262
|
+
* * `role` - One of "user", "admin", "peer"
|
|
263
|
+
*/
|
|
264
|
+
setClientRole(client_id: string, role: string): void;
|
|
265
|
+
/**
|
|
266
|
+
* Subscribe to a query with a callback.
|
|
267
|
+
*
|
|
268
|
+
* Default behavior matches RuntimeCore:
|
|
269
|
+
* - with upstream server: first callback waits for protocol QuerySettled convergence
|
|
270
|
+
* - without upstream server: first callback is local-immediate
|
|
271
|
+
*
|
|
272
|
+
* Pass `settled_tier` to override this default.
|
|
273
|
+
*
|
|
274
|
+
* # Returns
|
|
275
|
+
* Subscription handle (f64) for later unsubscription.
|
|
276
|
+
*/
|
|
277
|
+
subscribe(query_json: string, on_update: Function, session_json?: string | null, settled_tier?: string | null): number;
|
|
278
|
+
/**
|
|
279
|
+
* Unsubscribe from a query.
|
|
280
|
+
*/
|
|
281
|
+
unsubscribe(handle: number): void;
|
|
282
|
+
/**
|
|
283
|
+
* Update a row by ObjectId.
|
|
284
|
+
*/
|
|
285
|
+
update(object_id: string, values: any): void;
|
|
286
|
+
/**
|
|
287
|
+
* Update a row and return a Promise that resolves when the tier acks.
|
|
288
|
+
*/
|
|
289
|
+
updateWithAck(object_id: string, values: any, tier: string): Promise<any>;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export function bench_get_cache_bytes(): number;
|
|
293
|
+
|
|
294
|
+
export function bench_get_overflow_threshold_bytes(): number;
|
|
295
|
+
|
|
296
|
+
export function bench_get_pin_internal_pages(): boolean;
|
|
297
|
+
|
|
298
|
+
export function bench_get_read_coalesce_pages(): number;
|
|
299
|
+
|
|
300
|
+
export function bench_opfs_cold_random_read(count: number, value_size: number): Promise<any>;
|
|
301
|
+
|
|
302
|
+
export function bench_opfs_cold_sequential_read(count: number, value_size: number): Promise<any>;
|
|
303
|
+
|
|
304
|
+
export function bench_opfs_matrix(count: number): Promise<any>;
|
|
305
|
+
|
|
306
|
+
export function bench_opfs_mixed_matrix(count: number): Promise<any>;
|
|
307
|
+
|
|
308
|
+
export function bench_opfs_mixed_scenario(scenario_name: string, count: number, value_size: number, base_seed?: bigint | null): Promise<any>;
|
|
309
|
+
|
|
310
|
+
export function bench_opfs_random_read(count: number, value_size: number): Promise<any>;
|
|
311
|
+
|
|
312
|
+
export function bench_opfs_random_write(count: number, value_size: number): Promise<any>;
|
|
313
|
+
|
|
314
|
+
export function bench_opfs_range_random_window(count: number, value_size: number): Promise<any>;
|
|
315
|
+
|
|
316
|
+
export function bench_opfs_range_seq_window(count: number, value_size: number): Promise<any>;
|
|
317
|
+
|
|
318
|
+
export function bench_opfs_sequential_read(count: number, value_size: number): Promise<any>;
|
|
319
|
+
|
|
320
|
+
export function bench_opfs_sequential_write(count: number, value_size: number): Promise<any>;
|
|
321
|
+
|
|
322
|
+
export function bench_reset_cache_bytes(): void;
|
|
323
|
+
|
|
324
|
+
export function bench_reset_overflow_threshold_bytes(): void;
|
|
325
|
+
|
|
326
|
+
export function bench_reset_pin_internal_pages(): void;
|
|
327
|
+
|
|
328
|
+
export function bench_reset_read_coalesce_pages(): void;
|
|
329
|
+
|
|
330
|
+
export function bench_set_cache_bytes(cache_bytes: number): void;
|
|
331
|
+
|
|
332
|
+
export function bench_set_overflow_threshold_bytes(overflow_threshold_bytes: number): void;
|
|
333
|
+
|
|
334
|
+
export function bench_set_pin_internal_pages(pin_internal_pages: boolean): void;
|
|
335
|
+
|
|
336
|
+
export function bench_set_read_coalesce_pages(read_coalesce_pages: number): void;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Get the current timestamp in microseconds since Unix epoch.
|
|
340
|
+
*/
|
|
341
|
+
export function currentTimestamp(): bigint;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Generate a new UUID v7 (time-ordered).
|
|
345
|
+
*
|
|
346
|
+
* Useful for generating row IDs on the client side.
|
|
347
|
+
*/
|
|
348
|
+
export function generateId(): string;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Initialize the WASM module.
|
|
352
|
+
*
|
|
353
|
+
* Sets up panic hook for better error messages in the browser console.
|
|
354
|
+
*/
|
|
355
|
+
export function init(): void;
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Parse a schema from JSON string.
|
|
359
|
+
*
|
|
360
|
+
* Returns the schema as a JsValue for inspection.
|
|
361
|
+
*/
|
|
362
|
+
export function parseSchema(json: string): any;
|
|
363
|
+
|
|
364
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
365
|
+
|
|
366
|
+
export interface InitOutput {
|
|
367
|
+
readonly memory: WebAssembly.Memory;
|
|
368
|
+
readonly __wbg_wasmquerybuilder_free: (a: number, b: number) => void;
|
|
369
|
+
readonly currentTimestamp: () => bigint;
|
|
370
|
+
readonly generateId: () => [number, number];
|
|
371
|
+
readonly parseSchema: (a: number, b: number) => [number, number, number];
|
|
372
|
+
readonly wasmquerybuilder_alias: (a: number, b: number, c: number) => number;
|
|
373
|
+
readonly wasmquerybuilder_branch: (a: number, b: number, c: number) => number;
|
|
374
|
+
readonly wasmquerybuilder_branches: (a: number, b: number, c: number) => number;
|
|
375
|
+
readonly wasmquerybuilder_build: (a: number) => [number, number, number, number];
|
|
376
|
+
readonly wasmquerybuilder_buildJs: (a: number) => [number, number, number];
|
|
377
|
+
readonly wasmquerybuilder_filterEq: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
378
|
+
readonly wasmquerybuilder_filterGe: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
379
|
+
readonly wasmquerybuilder_filterGt: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
380
|
+
readonly wasmquerybuilder_filterLe: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
381
|
+
readonly wasmquerybuilder_filterLt: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
382
|
+
readonly wasmquerybuilder_filterNe: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
383
|
+
readonly wasmquerybuilder_includeDeleted: (a: number) => number;
|
|
384
|
+
readonly wasmquerybuilder_join: (a: number, b: number, c: number) => number;
|
|
385
|
+
readonly wasmquerybuilder_limit: (a: number, b: number) => number;
|
|
386
|
+
readonly wasmquerybuilder_new: (a: number, b: number) => number;
|
|
387
|
+
readonly wasmquerybuilder_offset: (a: number, b: number) => number;
|
|
388
|
+
readonly wasmquerybuilder_on: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
389
|
+
readonly wasmquerybuilder_or: (a: number) => number;
|
|
390
|
+
readonly wasmquerybuilder_orderBy: (a: number, b: number, c: number) => number;
|
|
391
|
+
readonly wasmquerybuilder_orderByDesc: (a: number, b: number, c: number) => number;
|
|
392
|
+
readonly wasmquerybuilder_select: (a: number, b: number, c: number) => number;
|
|
393
|
+
readonly init: () => void;
|
|
394
|
+
readonly __wbg_wasmruntime_free: (a: number, b: number) => void;
|
|
395
|
+
readonly wasmruntime_addClient: (a: number) => [number, number];
|
|
396
|
+
readonly wasmruntime_addServer: (a: number) => void;
|
|
397
|
+
readonly wasmruntime_delete: (a: number, b: number, c: number) => [number, number];
|
|
398
|
+
readonly wasmruntime_deleteWithAck: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
399
|
+
readonly wasmruntime_flush: (a: number) => void;
|
|
400
|
+
readonly wasmruntime_flushWal: (a: number) => void;
|
|
401
|
+
readonly wasmruntime_getSchema: (a: number) => [number, number, number];
|
|
402
|
+
readonly wasmruntime_getSchemaHash: (a: number) => [number, number];
|
|
403
|
+
readonly wasmruntime_insert: (a: number, b: number, c: number, d: any) => [number, number, number, number];
|
|
404
|
+
readonly wasmruntime_insertWithAck: (a: number, b: number, c: number, d: any, e: number, f: number) => [number, number, number];
|
|
405
|
+
readonly wasmruntime_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number, number];
|
|
406
|
+
readonly wasmruntime_onSyncMessageReceived: (a: number, b: number, c: number) => [number, number];
|
|
407
|
+
readonly wasmruntime_onSyncMessageReceivedFromClient: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
408
|
+
readonly wasmruntime_onSyncMessageToSend: (a: number, b: any) => void;
|
|
409
|
+
readonly wasmruntime_openPersistent: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => any;
|
|
410
|
+
readonly wasmruntime_query: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
|
|
411
|
+
readonly wasmruntime_removeServer: (a: number) => void;
|
|
412
|
+
readonly wasmruntime_setClientRole: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
413
|
+
readonly wasmruntime_subscribe: (a: number, b: number, c: number, d: any, e: number, f: number, g: number, h: number) => [number, number, number];
|
|
414
|
+
readonly wasmruntime_unsubscribe: (a: number, b: number) => void;
|
|
415
|
+
readonly wasmruntime_update: (a: number, b: number, c: number, d: any) => [number, number];
|
|
416
|
+
readonly wasmruntime_updateWithAck: (a: number, b: number, c: number, d: any, e: number, f: number) => [number, number, number];
|
|
417
|
+
readonly bench_get_pin_internal_pages: () => number;
|
|
418
|
+
readonly bench_opfs_cold_random_read: (a: number, b: number) => any;
|
|
419
|
+
readonly bench_opfs_cold_sequential_read: (a: number, b: number) => any;
|
|
420
|
+
readonly bench_opfs_matrix: (a: number) => any;
|
|
421
|
+
readonly bench_opfs_mixed_matrix: (a: number) => any;
|
|
422
|
+
readonly bench_opfs_mixed_scenario: (a: number, b: number, c: number, d: number, e: number, f: bigint) => any;
|
|
423
|
+
readonly bench_opfs_random_read: (a: number, b: number) => any;
|
|
424
|
+
readonly bench_opfs_random_write: (a: number, b: number) => any;
|
|
425
|
+
readonly bench_opfs_range_random_window: (a: number, b: number) => any;
|
|
426
|
+
readonly bench_opfs_range_seq_window: (a: number, b: number) => any;
|
|
427
|
+
readonly bench_opfs_sequential_read: (a: number, b: number) => any;
|
|
428
|
+
readonly bench_opfs_sequential_write: (a: number, b: number) => any;
|
|
429
|
+
readonly bench_set_cache_bytes: (a: number) => [number, number];
|
|
430
|
+
readonly bench_set_overflow_threshold_bytes: (a: number) => [number, number];
|
|
431
|
+
readonly bench_set_pin_internal_pages: (a: number) => void;
|
|
432
|
+
readonly bench_set_read_coalesce_pages: (a: number) => [number, number];
|
|
433
|
+
readonly bench_get_cache_bytes: () => number;
|
|
434
|
+
readonly bench_get_overflow_threshold_bytes: () => number;
|
|
435
|
+
readonly bench_get_read_coalesce_pages: () => number;
|
|
436
|
+
readonly bench_reset_cache_bytes: () => void;
|
|
437
|
+
readonly bench_reset_overflow_threshold_bytes: () => void;
|
|
438
|
+
readonly bench_reset_pin_internal_pages: () => void;
|
|
439
|
+
readonly bench_reset_read_coalesce_pages: () => void;
|
|
440
|
+
readonly wasm_bindgen__closure__destroy__h36582af6159eae23: (a: number, b: number) => void;
|
|
441
|
+
readonly wasm_bindgen__convert__closures_____invoke__h87add1091edf4849: (a: number, b: number, c: any, d: any) => void;
|
|
442
|
+
readonly wasm_bindgen__convert__closures_____invoke__h2cc017d284ea0daf: (a: number, b: number, c: any) => void;
|
|
443
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
444
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
445
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
446
|
+
readonly __externref_table_alloc: () => number;
|
|
447
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
448
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
449
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
450
|
+
readonly __wbindgen_start: () => void;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
457
|
+
* a precompiled `WebAssembly.Module`.
|
|
458
|
+
*
|
|
459
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
460
|
+
*
|
|
461
|
+
* @returns {InitOutput}
|
|
462
|
+
*/
|
|
463
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
467
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
468
|
+
*
|
|
469
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
470
|
+
*
|
|
471
|
+
* @returns {Promise<InitOutput>}
|
|
472
|
+
*/
|
|
473
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|