@rainlanguage/sqlite-web 0.0.1-alpha.5 → 0.0.1-alpha.7
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 +1 -1
- package/sqlite_web.d.ts +6 -4
- package/sqlite_web.js +88 -11
- package/sqlite_web_bg.wasm +0 -0
package/package.json
CHANGED
package/sqlite_web.d.ts
CHANGED
|
@@ -15,9 +15,11 @@ export class SQLiteWasmDatabase {
|
|
|
15
15
|
*/
|
|
16
16
|
static new(db_name: string): WasmEncodedResult<SQLiteWasmDatabase>;
|
|
17
17
|
/**
|
|
18
|
-
* Execute a SQL query
|
|
18
|
+
* Execute a SQL query (optionally parameterized via JS Array)
|
|
19
|
+
*
|
|
20
|
+
* Passing `undefined`/`null` from JS maps to `None`.
|
|
19
21
|
*/
|
|
20
|
-
query(sql: string): Promise<WasmEncodedResult<string>>;
|
|
22
|
+
query(sql: string, params?: Array<any> | null): Promise<WasmEncodedResult<string>>;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
@@ -26,7 +28,7 @@ export interface InitOutput {
|
|
|
26
28
|
readonly memory: WebAssembly.Memory;
|
|
27
29
|
readonly __wbg_sqlitewasmdatabase_free: (a: number, b: number) => void;
|
|
28
30
|
readonly sqlitewasmdatabase_new: (a: number, b: number) => any;
|
|
29
|
-
readonly sqlitewasmdatabase_query: (a: number, b: number, c: number) => any;
|
|
31
|
+
readonly sqlitewasmdatabase_query: (a: number, b: number, c: number, d: number) => any;
|
|
30
32
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
31
33
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
32
34
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
@@ -34,7 +36,7 @@ export interface InitOutput {
|
|
|
34
36
|
readonly __wbindgen_export_4: WebAssembly.Table;
|
|
35
37
|
readonly __wbindgen_export_5: WebAssembly.Table;
|
|
36
38
|
readonly closure22_externref_shim: (a: number, b: number, c: any) => void;
|
|
37
|
-
readonly
|
|
39
|
+
readonly closure16_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
38
40
|
readonly __wbindgen_start: () => void;
|
|
39
41
|
}
|
|
40
42
|
|
package/sqlite_web.js
CHANGED
|
@@ -197,12 +197,12 @@ function debugString(val) {
|
|
|
197
197
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
198
198
|
return className;
|
|
199
199
|
}
|
|
200
|
-
function
|
|
200
|
+
function __wbg_adapter_34(arg0, arg1, arg2) {
|
|
201
201
|
wasm.closure22_externref_shim(arg0, arg1, arg2);
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
function
|
|
205
|
-
wasm.
|
|
204
|
+
function __wbg_adapter_63(arg0, arg1, arg2, arg3) {
|
|
205
|
+
wasm.closure16_externref_shim(arg0, arg1, arg2, arg3);
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
const SQLiteWasmDatabaseFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -242,14 +242,17 @@ export class SQLiteWasmDatabase {
|
|
|
242
242
|
return ret;
|
|
243
243
|
}
|
|
244
244
|
/**
|
|
245
|
-
* Execute a SQL query
|
|
245
|
+
* Execute a SQL query (optionally parameterized via JS Array)
|
|
246
|
+
*
|
|
247
|
+
* Passing `undefined`/`null` from JS maps to `None`.
|
|
246
248
|
* @param {string} sql
|
|
249
|
+
* @param {Array<any> | null} [params]
|
|
247
250
|
* @returns {WasmEncodedResult<string>}
|
|
248
251
|
*/
|
|
249
|
-
query(sql) {
|
|
252
|
+
query(sql, params) {
|
|
250
253
|
const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
251
254
|
const len0 = WASM_VECTOR_LEN;
|
|
252
|
-
const ret = wasm.sqlitewasmdatabase_query(this.__wbg_ptr, ptr0, len0);
|
|
255
|
+
const ret = wasm.sqlitewasmdatabase_query(this.__wbg_ptr, ptr0, len0, isLikeNone(params) ? 0 : addToExternrefTable0(params));
|
|
253
256
|
return ret;
|
|
254
257
|
}
|
|
255
258
|
}
|
|
@@ -295,6 +298,10 @@ function __wbg_get_imports() {
|
|
|
295
298
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
296
299
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
297
300
|
};
|
|
301
|
+
imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
|
|
302
|
+
const ret = arg0.buffer;
|
|
303
|
+
return ret;
|
|
304
|
+
};
|
|
298
305
|
imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
|
|
299
306
|
const ret = arg0.call(arg1);
|
|
300
307
|
return ret;
|
|
@@ -318,6 +325,42 @@ function __wbg_get_imports() {
|
|
|
318
325
|
const ret = Reflect.get(arg0, arg1);
|
|
319
326
|
return ret;
|
|
320
327
|
}, arguments) };
|
|
328
|
+
imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
|
|
329
|
+
const ret = arg0[arg1 >>> 0];
|
|
330
|
+
return ret;
|
|
331
|
+
};
|
|
332
|
+
imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
|
|
333
|
+
let result;
|
|
334
|
+
try {
|
|
335
|
+
result = arg0 instanceof ArrayBuffer;
|
|
336
|
+
} catch (_) {
|
|
337
|
+
result = false;
|
|
338
|
+
}
|
|
339
|
+
const ret = result;
|
|
340
|
+
return ret;
|
|
341
|
+
};
|
|
342
|
+
imports.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
|
|
343
|
+
let result;
|
|
344
|
+
try {
|
|
345
|
+
result = arg0 instanceof Uint8Array;
|
|
346
|
+
} catch (_) {
|
|
347
|
+
result = false;
|
|
348
|
+
}
|
|
349
|
+
const ret = result;
|
|
350
|
+
return ret;
|
|
351
|
+
};
|
|
352
|
+
imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
|
|
353
|
+
const ret = Array.isArray(arg0);
|
|
354
|
+
return ret;
|
|
355
|
+
};
|
|
356
|
+
imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {
|
|
357
|
+
const ret = arg0.length;
|
|
358
|
+
return ret;
|
|
359
|
+
};
|
|
360
|
+
imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {
|
|
361
|
+
const ret = arg0.length;
|
|
362
|
+
return ret;
|
|
363
|
+
};
|
|
321
364
|
imports.wbg.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
|
|
322
365
|
try {
|
|
323
366
|
var state0 = {a: arg0, b: arg1};
|
|
@@ -325,7 +368,7 @@ function __wbg_get_imports() {
|
|
|
325
368
|
const a = state0.a;
|
|
326
369
|
state0.a = 0;
|
|
327
370
|
try {
|
|
328
|
-
return
|
|
371
|
+
return __wbg_adapter_63(a, state0.b, arg0, arg1);
|
|
329
372
|
} finally {
|
|
330
373
|
state0.a = a;
|
|
331
374
|
}
|
|
@@ -344,6 +387,10 @@ function __wbg_get_imports() {
|
|
|
344
387
|
const ret = new Array();
|
|
345
388
|
return ret;
|
|
346
389
|
};
|
|
390
|
+
imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
|
|
391
|
+
const ret = new Uint8Array(arg0);
|
|
392
|
+
return ret;
|
|
393
|
+
};
|
|
347
394
|
imports.wbg.__wbg_new_b1a33e5095abf678 = function() { return handleError(function (arg0, arg1) {
|
|
348
395
|
const ret = new Worker(getStringFromWasm0(arg0, arg1));
|
|
349
396
|
return ret;
|
|
@@ -380,6 +427,9 @@ function __wbg_get_imports() {
|
|
|
380
427
|
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
381
428
|
arg0[arg1] = arg2;
|
|
382
429
|
};
|
|
430
|
+
imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
|
|
431
|
+
arg0.set(arg1, arg2 >>> 0);
|
|
432
|
+
};
|
|
383
433
|
imports.wbg.__wbg_set_bb8cecf6a62b9f46 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
384
434
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
385
435
|
return ret;
|
|
@@ -418,6 +468,15 @@ function __wbg_get_imports() {
|
|
|
418
468
|
const ret = arg0.then(arg1, arg2);
|
|
419
469
|
return ret;
|
|
420
470
|
};
|
|
471
|
+
imports.wbg.__wbg_toString_b5d4438bc26b267c = function() { return handleError(function (arg0, arg1) {
|
|
472
|
+
const ret = arg0.toString(arg1);
|
|
473
|
+
return ret;
|
|
474
|
+
}, arguments) };
|
|
475
|
+
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
476
|
+
const v = arg0;
|
|
477
|
+
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
478
|
+
return ret;
|
|
479
|
+
};
|
|
421
480
|
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
422
481
|
const obj = arg0.original;
|
|
423
482
|
if (obj.cnt-- == 1) {
|
|
@@ -427,12 +486,12 @@ function __wbg_get_imports() {
|
|
|
427
486
|
const ret = false;
|
|
428
487
|
return ret;
|
|
429
488
|
};
|
|
430
|
-
imports.wbg.
|
|
431
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
489
|
+
imports.wbg.__wbindgen_closure_wrapper107 = function(arg0, arg1, arg2) {
|
|
490
|
+
const ret = makeMutClosure(arg0, arg1, 23, __wbg_adapter_34);
|
|
432
491
|
return ret;
|
|
433
492
|
};
|
|
434
|
-
imports.wbg.
|
|
435
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
493
|
+
imports.wbg.__wbindgen_closure_wrapper840 = function(arg0, arg1, arg2) {
|
|
494
|
+
const ret = makeMutClosure(arg0, arg1, 33, __wbg_adapter_34);
|
|
436
495
|
return ret;
|
|
437
496
|
};
|
|
438
497
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
@@ -452,6 +511,10 @@ function __wbg_get_imports() {
|
|
|
452
511
|
table.set(offset + 3, false);
|
|
453
512
|
;
|
|
454
513
|
};
|
|
514
|
+
imports.wbg.__wbindgen_is_bigint = function(arg0) {
|
|
515
|
+
const ret = typeof(arg0) === 'bigint';
|
|
516
|
+
return ret;
|
|
517
|
+
};
|
|
455
518
|
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
456
519
|
const ret = typeof(arg0) === 'function';
|
|
457
520
|
return ret;
|
|
@@ -464,6 +527,20 @@ function __wbg_get_imports() {
|
|
|
464
527
|
const ret = arg0 === undefined;
|
|
465
528
|
return ret;
|
|
466
529
|
};
|
|
530
|
+
imports.wbg.__wbindgen_memory = function() {
|
|
531
|
+
const ret = wasm.memory;
|
|
532
|
+
return ret;
|
|
533
|
+
};
|
|
534
|
+
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
535
|
+
const obj = arg1;
|
|
536
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
537
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
538
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
539
|
+
};
|
|
540
|
+
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
541
|
+
const ret = arg0;
|
|
542
|
+
return ret;
|
|
543
|
+
};
|
|
467
544
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
468
545
|
const obj = arg1;
|
|
469
546
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
package/sqlite_web_bg.wasm
CHANGED
|
Binary file
|