Transaction
TypeScriptSource files: TypeScript
Handle valid only while its transaction callback is active.
Properties
execute
execute: ExecuteQuery
Defined in: types.ts:276
Execute within this transaction on the calling thread.
executeAsync
executeAsync: ExecuteAsyncQuery
Defined in: types.ts:278
Execute within this transaction on a background thread.
executeRaw
executeRaw: ExecuteRawQuery
Defined in: types.ts:280
Execute within this transaction on the calling thread, returning rows as arrays of column values.
executeRawAsync
executeRawAsync: ExecuteRawAsyncQuery
Defined in: types.ts:282
Execute within this transaction on a background thread, returning rows as arrays of column values.
Methods
commit()
commit(): NitroSQLiteQueryResult
Defined in: types.ts:268
Commit now. Marks completion only after SQLite accepts COMMIT. On failure, only rollback remains available and the wrapper rejects unless the callback explicitly rolls back. Throws while async queries are pending.
Returns
rollback()
rollback(): NitroSQLiteQueryResult
Defined in: types.ts:274
Roll back now, including after a failed commit. Marks completion only after SQLite accepts ROLLBACK. A failed rollback rejects the transaction promise even if caught by the callback. Throws while async queries are pending or after successful finalization.