Skip to content

Latest commit

 

History

History

sqlite

README.md

Bounda

@bounda-dev/sqlite

Mutation score

SQLite storage for Bounda, through libSQL: a local file, memory, or a libSQL server such as Turso.

npm install @bounda-dev/core @bounda-dev/sqlite
// bounda.config.ts
import { defineConfig } from "@bounda-dev/core/config";
import { sqlite } from "@bounda-dev/sqlite";

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.