@bounda-dev/adapter-sqlite
v0.1.0
Published
SQLite and libSQL storage adapter for Bounda
Readme
@bounda-dev/adapter-sqlite
SQLite storage for Bounda, through libSQL: a local file, memory, or a libSQL server such as Turso.
npm install @bounda-dev/core @bounda-dev/adapter-sqlite// bounda.config.ts
import { sqlite } from "@bounda-dev/adapter-sqlite";
import { defineConfig } from "@bounda-dev/core/config";
export default defineConfig({
storage: sqlite({ path: "./data/app.db" }),
});sqlite({ memory: true }) keeps everything in memory; sqlite({ url, authToken }) points at a
libSQL server. A second argument prefixes the tables it creates (bounda_ by default).
The adapter holds the event store, the checkpoints, the inbox, the dead letters, the scheduler and
the read-model tables. Appends run in BEGIN IMMEDIATE transactions and claims are single
statements with RETURNING, so several workers on the same file stay correct. Storage and read
models opened from the same adapter share one connection.
Status
0.x. Until 1.0 the API can still change between minor versions, and every change that breaks something is called out in the changelog.
Docs: docs.bounda.dev/adapters/sqlite. Source and issues: github.com/bounda-dev/bounda.
