We are bringing the first public release of our new JavaScript bindings, in two flavours, wasm for embedding in abrowser, and napi to use with nodejs.

Demo

We are introducing a new live demo, based on the wasm bindings which serve as an example for integration in a website source code for the demo.

Known issues/limitations

  • The wasm variant is limited to the redb backend and has no support for permanent storage (#702).
  • Issues when returning node values in queries such as MATCH (n) RETURN n (#703).

Feel free to report issues or feature requests at gitlab.

npm usage

Install linux (x86 and arm):

npm install @gqlite.org/gqlite-napi

or for wasm:

npm install @gqlite.org/gqlite-wasm

And then:

import { Connection } from '@gqlite.org/gqlite-napi';

const conn = new Connection(); // in-memory database
const result = await conn.query('RETURN 1 AS n', {});
console.log(result); // [["n"], [1]]

conn.close();

Change napi to wasm for the wasm variant.

Updated: