Skip to main content
Version: 3.0 Beta

SQLite

Installing driver​

npm install better-sqlite3
npm install --save-dev @types/better-sqlite3

Creating ZenStackClient​

import { schema } from './zenstack/schema';
import SQLite from 'better-sqlite3';
import { ZenStackClient } from '@zenstackhq/orm';
import { SqliteDialect } from '@zenstackhq/orm/dialects/sqlite';

const db = new ZenStackClient(schema, {
dialect: new SqliteDialect({ database: new SQLite('./dev.db') }),
});
Comments
Feel free to ask questions, give feedback, or report issues.

Don't Spam


You can edit/delete your comments by going directly to the discussion, clicking on the 'comments' link below