@grafeo-db/wasm-lite 0.5.34 → 0.5.35
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/grafeo_wasm.d.ts +4 -0
- package/grafeo_wasm_bg.js +17 -3
- package/grafeo_wasm_bg.wasm +0 -0
- package/grafeo_wasm_bg.wasm.d.ts +1 -1
- package/package.json +1 -1
package/grafeo_wasm.d.ts
CHANGED
|
@@ -301,6 +301,10 @@ export class Database {
|
|
|
301
301
|
* Equivalent to `SESSION SET SCHEMA name` but persists across calls.
|
|
302
302
|
* Call `resetSchema()` to clear it.
|
|
303
303
|
*
|
|
304
|
+
* # Errors
|
|
305
|
+
*
|
|
306
|
+
* Returns an error if the schema does not exist.
|
|
307
|
+
*
|
|
304
308
|
* ```js
|
|
305
309
|
* db.setSchema("reporting");
|
|
306
310
|
* const types = db.execute("SHOW GRAPH TYPES"); // only sees 'reporting' types
|
package/grafeo_wasm_bg.js
CHANGED
|
@@ -602,6 +602,10 @@ export class Database {
|
|
|
602
602
|
* Equivalent to `SESSION SET SCHEMA name` but persists across calls.
|
|
603
603
|
* Call `resetSchema()` to clear it.
|
|
604
604
|
*
|
|
605
|
+
* # Errors
|
|
606
|
+
*
|
|
607
|
+
* Returns an error if the schema does not exist.
|
|
608
|
+
*
|
|
605
609
|
* ```js
|
|
606
610
|
* db.setSchema("reporting");
|
|
607
611
|
* const types = db.execute("SHOW GRAPH TYPES"); // only sees 'reporting' types
|
|
@@ -609,9 +613,19 @@ export class Database {
|
|
|
609
613
|
* @param {string} name
|
|
610
614
|
*/
|
|
611
615
|
setSchema(name) {
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
616
|
+
try {
|
|
617
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
618
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
619
|
+
const len0 = WASM_VECTOR_LEN;
|
|
620
|
+
wasm.database_setSchema(retptr, this.__wbg_ptr, ptr0, len0);
|
|
621
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
622
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
623
|
+
if (r1) {
|
|
624
|
+
throw takeObject(r0);
|
|
625
|
+
}
|
|
626
|
+
} finally {
|
|
627
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
628
|
+
}
|
|
615
629
|
}
|
|
616
630
|
/**
|
|
617
631
|
* Returns the Grafeo version.
|
package/grafeo_wasm_bg.wasm
CHANGED
|
Binary file
|
package/grafeo_wasm_bg.wasm.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export const database_new: (a: number) => void;
|
|
|
22
22
|
export const database_nodeCount: (a: number) => number;
|
|
23
23
|
export const database_resetSchema: (a: number) => void;
|
|
24
24
|
export const database_schema: (a: number, b: number) => void;
|
|
25
|
-
export const database_setSchema: (a: number, b: number, c: number) => void;
|
|
25
|
+
export const database_setSchema: (a: number, b: number, c: number, d: number) => void;
|
|
26
26
|
export const database_version: (a: number) => void;
|
|
27
27
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
28
28
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|