@rainlanguage/sqlite-web 0.0.1-alpha.8 → 0.0.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 +5 -1
- package/sqlite_web.d.ts +4 -2
- package/sqlite_web.js +92 -5
- package/sqlite_web_bg.wasm +0 -0
package/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rainlanguage/sqlite-web",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.2",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/rainlanguage/sqlite-web"
|
|
8
|
+
},
|
|
5
9
|
"files": [
|
|
6
10
|
"sqlite_web_bg.wasm",
|
|
7
11
|
"sqlite_web.js",
|
package/sqlite_web.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export class SQLiteWasmDatabase {
|
|
|
20
20
|
* Passing `undefined`/`null` from JS maps to `None`.
|
|
21
21
|
*/
|
|
22
22
|
query(sql: string, params?: Array<any> | null): Promise<WasmEncodedResult<string>>;
|
|
23
|
+
wipeAndRecreate(): Promise<WasmEncodedResult<void>>;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
@@ -29,14 +30,15 @@ export interface InitOutput {
|
|
|
29
30
|
readonly __wbg_sqlitewasmdatabase_free: (a: number, b: number) => void;
|
|
30
31
|
readonly sqlitewasmdatabase_new: (a: number, b: number) => any;
|
|
31
32
|
readonly sqlitewasmdatabase_query: (a: number, b: number, c: number, d: number) => any;
|
|
33
|
+
readonly sqlitewasmdatabase_wipeAndRecreate: (a: number) => any;
|
|
32
34
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
33
35
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
34
36
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
35
37
|
readonly __externref_table_alloc: () => number;
|
|
36
38
|
readonly __wbindgen_export_4: WebAssembly.Table;
|
|
37
39
|
readonly __wbindgen_export_5: WebAssembly.Table;
|
|
38
|
-
readonly
|
|
39
|
-
readonly
|
|
40
|
+
readonly closure37_externref_shim: (a: number, b: number, c: any) => void;
|
|
41
|
+
readonly closure21_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
40
42
|
readonly __wbindgen_start: () => void;
|
|
41
43
|
}
|
|
42
44
|
|
package/sqlite_web.js
CHANGED
|
@@ -198,11 +198,11 @@ function debugString(val) {
|
|
|
198
198
|
return className;
|
|
199
199
|
}
|
|
200
200
|
function __wbg_adapter_50(arg0, arg1, arg2) {
|
|
201
|
-
wasm.
|
|
201
|
+
wasm.closure37_externref_shim(arg0, arg1, arg2);
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
function __wbg_adapter_91(arg0, arg1, arg2, arg3) {
|
|
205
|
-
wasm.
|
|
205
|
+
wasm.closure21_externref_shim(arg0, arg1, arg2, arg3);
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
const SQLiteWasmDatabaseFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -255,6 +255,13 @@ export class SQLiteWasmDatabase {
|
|
|
255
255
|
const ret = wasm.sqlitewasmdatabase_query(this.__wbg_ptr, ptr0, len0, isLikeNone(params) ? 0 : addToExternrefTable0(params));
|
|
256
256
|
return ret;
|
|
257
257
|
}
|
|
258
|
+
/**
|
|
259
|
+
* @returns {WasmEncodedResult<void>}
|
|
260
|
+
*/
|
|
261
|
+
wipeAndRecreate() {
|
|
262
|
+
const ret = wasm.sqlitewasmdatabase_wipeAndRecreate(this.__wbg_ptr);
|
|
263
|
+
return ret;
|
|
264
|
+
}
|
|
258
265
|
}
|
|
259
266
|
|
|
260
267
|
async function __wbg_load(module, imports) {
|
|
@@ -325,10 +332,22 @@ function __wbg_get_imports() {
|
|
|
325
332
|
const ret = arg0.done;
|
|
326
333
|
return ret;
|
|
327
334
|
};
|
|
335
|
+
imports.wbg.__wbg_entries_19efe296f7d36df9 = function(arg0) {
|
|
336
|
+
const ret = arg0.entries();
|
|
337
|
+
return ret;
|
|
338
|
+
};
|
|
328
339
|
imports.wbg.__wbg_entries_3265d4158b33e5dc = function(arg0) {
|
|
329
340
|
const ret = Object.entries(arg0);
|
|
330
341
|
return ret;
|
|
331
342
|
};
|
|
343
|
+
imports.wbg.__wbg_getDirectoryHandle_c48a138373d79b3d = function(arg0, arg1, arg2, arg3) {
|
|
344
|
+
const ret = arg0.getDirectoryHandle(getStringFromWasm0(arg1, arg2), arg3);
|
|
345
|
+
return ret;
|
|
346
|
+
};
|
|
347
|
+
imports.wbg.__wbg_getDirectory_c206b0540c9acc0f = function(arg0) {
|
|
348
|
+
const ret = arg0.getDirectory();
|
|
349
|
+
return ret;
|
|
350
|
+
};
|
|
332
351
|
imports.wbg.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
|
|
333
352
|
const ret = Reflect.get(arg0, arg1);
|
|
334
353
|
return ret;
|
|
@@ -347,6 +366,26 @@ function __wbg_get_imports() {
|
|
|
347
366
|
const ret = result;
|
|
348
367
|
return ret;
|
|
349
368
|
};
|
|
369
|
+
imports.wbg.__wbg_instanceof_DomException_ed1ccb7aaf39034c = function(arg0) {
|
|
370
|
+
let result;
|
|
371
|
+
try {
|
|
372
|
+
result = arg0 instanceof DOMException;
|
|
373
|
+
} catch (_) {
|
|
374
|
+
result = false;
|
|
375
|
+
}
|
|
376
|
+
const ret = result;
|
|
377
|
+
return ret;
|
|
378
|
+
};
|
|
379
|
+
imports.wbg.__wbg_instanceof_FileSystemDirectoryHandle_0906fc139d75557b = function(arg0) {
|
|
380
|
+
let result;
|
|
381
|
+
try {
|
|
382
|
+
result = arg0 instanceof FileSystemDirectoryHandle;
|
|
383
|
+
} catch (_) {
|
|
384
|
+
result = false;
|
|
385
|
+
}
|
|
386
|
+
const ret = result;
|
|
387
|
+
return ret;
|
|
388
|
+
};
|
|
350
389
|
imports.wbg.__wbg_instanceof_Map_f3469ce2244d2430 = function(arg0) {
|
|
351
390
|
let result;
|
|
352
391
|
try {
|
|
@@ -357,6 +396,16 @@ function __wbg_get_imports() {
|
|
|
357
396
|
const ret = result;
|
|
358
397
|
return ret;
|
|
359
398
|
};
|
|
399
|
+
imports.wbg.__wbg_instanceof_Navigator_1a0ee377f1057fd4 = function(arg0) {
|
|
400
|
+
let result;
|
|
401
|
+
try {
|
|
402
|
+
result = arg0 instanceof Navigator;
|
|
403
|
+
} catch (_) {
|
|
404
|
+
result = false;
|
|
405
|
+
}
|
|
406
|
+
const ret = result;
|
|
407
|
+
return ret;
|
|
408
|
+
};
|
|
360
409
|
imports.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
|
|
361
410
|
let result;
|
|
362
411
|
try {
|
|
@@ -367,6 +416,16 @@ function __wbg_get_imports() {
|
|
|
367
416
|
const ret = result;
|
|
368
417
|
return ret;
|
|
369
418
|
};
|
|
419
|
+
imports.wbg.__wbg_instanceof_Window_def73ea0955fc569 = function(arg0) {
|
|
420
|
+
let result;
|
|
421
|
+
try {
|
|
422
|
+
result = arg0 instanceof Window;
|
|
423
|
+
} catch (_) {
|
|
424
|
+
result = false;
|
|
425
|
+
}
|
|
426
|
+
const ret = result;
|
|
427
|
+
return ret;
|
|
428
|
+
};
|
|
370
429
|
imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
|
|
371
430
|
const ret = Array.isArray(arg0);
|
|
372
431
|
return ret;
|
|
@@ -387,6 +446,17 @@ function __wbg_get_imports() {
|
|
|
387
446
|
const ret = arg0.length;
|
|
388
447
|
return ret;
|
|
389
448
|
};
|
|
449
|
+
imports.wbg.__wbg_name_f2d27098bfd843e7 = function(arg0, arg1) {
|
|
450
|
+
const ret = arg1.name;
|
|
451
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
452
|
+
const len1 = WASM_VECTOR_LEN;
|
|
453
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
454
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
455
|
+
};
|
|
456
|
+
imports.wbg.__wbg_navigator_1577371c070c8947 = function(arg0) {
|
|
457
|
+
const ret = arg0.navigator;
|
|
458
|
+
return ret;
|
|
459
|
+
};
|
|
390
460
|
imports.wbg.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
|
|
391
461
|
try {
|
|
392
462
|
var state0 = {a: arg0, b: arg1};
|
|
@@ -451,6 +521,10 @@ function __wbg_get_imports() {
|
|
|
451
521
|
const ret = arg0.queueMicrotask;
|
|
452
522
|
return ret;
|
|
453
523
|
};
|
|
524
|
+
imports.wbg.__wbg_removeEntry_a424e90dff229b19 = function(arg0, arg1, arg2, arg3) {
|
|
525
|
+
const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2), arg3);
|
|
526
|
+
return ret;
|
|
527
|
+
};
|
|
454
528
|
imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) {
|
|
455
529
|
const ret = Promise.resolve(arg0);
|
|
456
530
|
return ret;
|
|
@@ -468,9 +542,15 @@ function __wbg_get_imports() {
|
|
|
468
542
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
469
543
|
return ret;
|
|
470
544
|
}, arguments) };
|
|
545
|
+
imports.wbg.__wbg_setcreate_4ca762e23d9f78da = function(arg0, arg1) {
|
|
546
|
+
arg0.create = arg1 !== 0;
|
|
547
|
+
};
|
|
471
548
|
imports.wbg.__wbg_setonmessage_5a885b16bdc6dca6 = function(arg0, arg1) {
|
|
472
549
|
arg0.onmessage = arg1;
|
|
473
550
|
};
|
|
551
|
+
imports.wbg.__wbg_setrecursive_536113a081d6177a = function(arg0, arg1) {
|
|
552
|
+
arg0.recursive = arg1 !== 0;
|
|
553
|
+
};
|
|
474
554
|
imports.wbg.__wbg_settype_39ed370d3edd403c = function(arg0, arg1, arg2) {
|
|
475
555
|
arg0.type = getStringFromWasm0(arg1, arg2);
|
|
476
556
|
};
|
|
@@ -494,6 +574,13 @@ function __wbg_get_imports() {
|
|
|
494
574
|
const ret = typeof window === 'undefined' ? null : window;
|
|
495
575
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
496
576
|
};
|
|
577
|
+
imports.wbg.__wbg_storage_89a3fec18b19e1aa = function(arg0) {
|
|
578
|
+
const ret = arg0.storage;
|
|
579
|
+
return ret;
|
|
580
|
+
};
|
|
581
|
+
imports.wbg.__wbg_terminate_e8eab2977ce01111 = function(arg0) {
|
|
582
|
+
arg0.terminate();
|
|
583
|
+
};
|
|
497
584
|
imports.wbg.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {
|
|
498
585
|
const ret = arg0.then(arg1);
|
|
499
586
|
return ret;
|
|
@@ -538,12 +625,12 @@ function __wbg_get_imports() {
|
|
|
538
625
|
const ret = false;
|
|
539
626
|
return ret;
|
|
540
627
|
};
|
|
541
|
-
imports.wbg.
|
|
628
|
+
imports.wbg.__wbindgen_closure_wrapper1119 = function(arg0, arg1, arg2) {
|
|
542
629
|
const ret = makeMutClosure(arg0, arg1, 49, __wbg_adapter_50);
|
|
543
630
|
return ret;
|
|
544
631
|
};
|
|
545
|
-
imports.wbg.
|
|
546
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
632
|
+
imports.wbg.__wbindgen_closure_wrapper990 = function(arg0, arg1, arg2) {
|
|
633
|
+
const ret = makeMutClosure(arg0, arg1, 38, __wbg_adapter_50);
|
|
547
634
|
return ret;
|
|
548
635
|
};
|
|
549
636
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
package/sqlite_web_bg.wasm
CHANGED
|
Binary file
|