@rainlanguage/sqlite-web 0.0.1-alpha.0 → 0.0.1-alpha.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rainlanguage/sqlite-web",
3
3
  "type": "module",
4
- "version": "0.0.1-alpha.0",
4
+ "version": "0.0.1-alpha.1",
5
5
  "files": [
6
6
  "sqlite_web_bg.wasm",
7
7
  "sqlite_web.js",
package/sqlite_web.d.ts CHANGED
@@ -13,7 +13,7 @@ export class SQLiteWasmDatabase {
13
13
  /**
14
14
  * Create a new database connection with fully embedded worker
15
15
  */
16
- static new(): WasmEncodedResult<SQLiteWasmDatabase>;
16
+ static new(db_name: string): WasmEncodedResult<SQLiteWasmDatabase>;
17
17
  /**
18
18
  * Execute a SQL query
19
19
  */
@@ -25,7 +25,7 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
25
25
  export interface InitOutput {
26
26
  readonly memory: WebAssembly.Memory;
27
27
  readonly __wbg_sqlitewasmdatabase_free: (a: number, b: number) => void;
28
- readonly sqlitewasmdatabase_new: () => any;
28
+ readonly sqlitewasmdatabase_new: (a: number, b: number) => any;
29
29
  readonly sqlitewasmdatabase_query: (a: number, b: number, c: number) => any;
30
30
  readonly __wbindgen_malloc: (a: number, b: number) => number;
31
31
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
@@ -33,7 +33,7 @@ export interface InitOutput {
33
33
  readonly __externref_table_alloc: () => number;
34
34
  readonly __wbindgen_export_4: WebAssembly.Table;
35
35
  readonly __wbindgen_export_5: WebAssembly.Table;
36
- readonly closure21_externref_shim: (a: number, b: number, c: any) => void;
36
+ readonly closure22_externref_shim: (a: number, b: number, c: any) => void;
37
37
  readonly closure15_externref_shim: (a: number, b: number, c: any, d: any) => void;
38
38
  readonly __wbindgen_start: () => void;
39
39
  }
package/sqlite_web.js CHANGED
@@ -198,7 +198,7 @@ function debugString(val) {
198
198
  return className;
199
199
  }
200
200
  function __wbg_adapter_24(arg0, arg1, arg2) {
201
- wasm.closure21_externref_shim(arg0, arg1, arg2);
201
+ wasm.closure22_externref_shim(arg0, arg1, arg2);
202
202
  }
203
203
 
204
204
  function __wbg_adapter_43(arg0, arg1, arg2, arg3) {
@@ -232,10 +232,13 @@ export class SQLiteWasmDatabase {
232
232
  }
233
233
  /**
234
234
  * Create a new database connection with fully embedded worker
235
+ * @param {string} db_name
235
236
  * @returns {WasmEncodedResult<SQLiteWasmDatabase>}
236
237
  */
237
- static new() {
238
- const ret = wasm.sqlitewasmdatabase_new();
238
+ static new(db_name) {
239
+ const ptr0 = passStringToWasm0(db_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
240
+ const len0 = WASM_VECTOR_LEN;
241
+ const ret = wasm.sqlitewasmdatabase_new(ptr0, len0);
239
242
  return ret;
240
243
  }
241
244
  /**
@@ -424,12 +427,12 @@ function __wbg_get_imports() {
424
427
  const ret = false;
425
428
  return ret;
426
429
  };
427
- imports.wbg.__wbindgen_closure_wrapper113 = function(arg0, arg1, arg2) {
428
- const ret = makeMutClosure(arg0, arg1, 22, __wbg_adapter_24);
430
+ imports.wbg.__wbindgen_closure_wrapper785 = function(arg0, arg1, arg2) {
431
+ const ret = makeMutClosure(arg0, arg1, 28, __wbg_adapter_24);
429
432
  return ret;
430
433
  };
431
- imports.wbg.__wbindgen_closure_wrapper60 = function(arg0, arg1, arg2) {
432
- const ret = makeMutClosure(arg0, arg1, 27, __wbg_adapter_24);
434
+ imports.wbg.__wbindgen_closure_wrapper79 = function(arg0, arg1, arg2) {
435
+ const ret = makeMutClosure(arg0, arg1, 23, __wbg_adapter_24);
433
436
  return ret;
434
437
  };
435
438
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
Binary file