Skip to content

@xtandard/audit/storage/sqlite

SQLite storage on bun:sqlite: createSqliteStorage(), for single-node deployments and local persistence, with the native event log. Bun only.

import { … } from "@xtandard/audit/storage/sqlite";
Name Summary
createSqliteStorage Create a SQLite-backed storage. Requires the Bun runtime (bun:sqlite) once used. The tables are created (IF NOT EXISTS) on first use.
Name Summary
SqliteAuditStorage A storage backed by SQLite with the native EventLogStorage and compareAndSwap, plus close().
Name Summary
SqliteStorageOptions Options for createSqliteStorage: a file path (default ":memory:") or an existing database, and the KV table (default "xtandard_audit"); the event log uses {table}_events and {table}_event_targets. Validated as a safe identifier.