meshql-sqlite (@meshql/sqlite)
SQLite helper for MeshQL. Builds parameterised SELECT statements from a join plan; runs on Node 22.5+’s built-in node:sqlite (no native deps).
Install
Section titled “Install”npm install meshql-sqlite meshql-core# ornpx jsr add @meshql/sqlite @meshql/corePublished on npm as meshql-sqlite and JSR as @meshql/sqlite.
Example
Section titled “Example”import { DatabaseSync } from "node:sqlite";import { createMesh, type MeshSchema } from "meshql-core";import { buildSelectSql } from "meshql-sqlite";
const db = new DatabaseSync(":memory:");const schema: MeshSchema = { /* … */ };const mesh = createMesh(schema);
mesh.resolve("user", async (plan) => { const { sql, params } = buildSelectSql(plan, schema); return db.prepare(sql).all(...params);});JSR imports: @meshql/core, @meshql/sqlite.
See also @meshql/postgres.