-
Notifications
You must be signed in to change notification settings - Fork 1
backend sqlite Overview
GitHub Action edited this page Apr 21, 2026
·
2 revisions
The SQLite adapter for @quatrain/backend. This package allows Quatrain business objects to be persisted locally in a lightweight, file-based SQL database.
SQLite is perfect for local development, testing, CLI tools, or mobile/desktop applications built with Node.js/Electron. This adapter translates Quatrain models into local SQLite tables and queries.
npm install @quatrain/backend-sqlite sqlite3
# or
yarn add @quatrain/backend-sqlite sqlite3Register the adapter with the path to your .sqlite file. If the file does not exist, it will be created automatically.
import { Backend } from '@quatrain/backend'
import { SqliteAdapter } from '@quatrain/backend-sqlite'
const sqliteAdapter = new SqliteAdapter({
config: {
filename: './data/database.sqlite'
}
})
Backend.addAdapter('sqlite', sqliteAdapter, true)For concrete examples and usage guides, please refer to the How-To Guide.
AGPL-3.0-only