runTransaction
Function: runTransaction()
runTransaction<
R>(client,fn):Promise<R>
Defined in: packages/sql/src/relational/transaction.ts:9
Run statements in one transaction: BEGIN, the function, COMMIT; ROLLBACK and rethrow when it throws
Type Parameters
R
R
Parameters
client
a client whose statements run on one connection
fn
(tx) => Promise<R>
the statements, run on the client
Returns
Promise<R>
the function result