SqliteExecutor
Defined in: src/storage/kv-sqlite.ts:24
The tiny async SQL surface the core needs (positional ? parameters).
Methods
Section titled “Methods”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).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
sql |
string |
args |
unknown[] |
Returns
Section titled “Returns”Promise<SqliteRow[]>
atomic()?
Section titled “atomic()?”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).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
statements |
readonly SqliteStatement[] |
Returns
Section titled “Returns”Promise<number[]>