createSqliteStorage
function createSqliteStorage(options?): SqliteAuditStorage;Defined in: src/storage/sqlite.ts:68
Create a SQLite-backed storage. Requires the Bun runtime (bun:sqlite) once
used. The tables are created (IF NOT EXISTS) on first use.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? |
SqliteStorageOptions |
Returns
Section titled “Returns”Example
Section titled “Example”import { createSqliteStorage } from "@xtandard/audit/storage/sqlite";
// File-backed (persists across restarts):const storage = createSqliteStorage({ path: "./audit.sqlite" });
// In-memory (reset each run, useful for tests):// const storage = createSqliteStorage({ path: ":memory:" });