Documentation
    Preparing search index...

    Module @quatrain/backend-sqlite

    @quatrain/backend-sqlite

    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 sqlite3

    Register 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

    Classes

    SQLiteAdapter