Skip to content

Defined in: hub/src/store/sql.ts:24

The slice of a Postgres client the SQL store needs (PGlite and node-postgres both fit).

query<T>(sql, params?): Promise<{
rows: T[];
}>;

Defined in: hub/src/store/sql.ts:22

Type Parameter
T
Parameter Type
sql string
params? unknown[]

Promise<{ rows: T[]; }>

SqlQueryable.query


transaction<T>(fn): Promise<T>;

Defined in: hub/src/store/sql.ts:26

Runs fn in a transaction; a throw rolls it back.

Type Parameter
T
Parameter Type
fn (tx) => Promise<T>

Promise<T>