Skip to content

SqliteExecutor

Defined in: src/storage/kv-sqlite.ts:24

The tiny async SQL surface the core needs (positional ? parameters).

all(sql, args): Promise<SqliteRow[]>;

Defined in: src/storage/kv-sqlite.ts:26

Run a statement and return its rows (empty for statements without RETURNING).

Parameter Type
sql string
args unknown[]

Promise<SqliteRow[]>


atomic?(statements): Promise<number[]>;

Defined in: src/storage/kv-sqlite.ts:33

Run several write statements atomically (all or nothing), resolving with the rows each one changed. The kit’s bunSqliteExecutor (BEGIN IMMEDIATE) and libsqlExecutor (batch(…, "write")) implement it; product tables that write several rows in one step use it (audit’s event log, entitlements’ counters).

Parameter Type
statements readonly SqliteStatement[]

Promise<number[]>