@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";Functions
Section titled “Functions”| 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. |
Interfaces
Section titled “Interfaces”| Name | Summary |
|---|---|
SqliteAuditStorage |
A storage backed by SQLite with the native EventLogStorage and compareAndSwap, plus close(). |
Type aliases
Section titled “Type aliases”| 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. |