@gqlite.org/gqlite-wasm
v0.13.0
Published
gqlite JavaScript library (WASM/browser binding), redb backend.
Readme
@gqlite.org/gqlite-wasm
gqlite, compiled to WebAssembly, running in the browser or Node.js — same
package, same API, either environment. Backed by an in-memory redb
store (persistence is planned; see the gqlite project for status).
Install
npm install @gqlite.org/gqlite-wasmUsage
import init, { Connection } from '@gqlite.org/gqlite-wasm';
await init();
const conn = new Connection(); // in-memory database
const result = await conn.query('RETURN 1 AS n', {});
console.log(result); // [["n"], [1]]
conn.close();Connection's constructor takes an optional options object, forwarded
directly to gqlite's connection options — omit it (or pass {}) for an
in-memory database.
License
MIT
