Transaction
TypeScriptSource files: TypeScript
Handle valid only while its transaction callback and SQLite transaction are active. If SQLite implicitly rolls back the transaction, further queries reject before executing SQL, including queries already queued on the background worker. A caught ABORT constraint error leaves the transaction usable.
Properties
execute
execute: ExecuteQuery
Defined in: packages/react-native-nitro-sqlite/src/types.ts:375
Execute within this transaction on the calling thread.
executeAsync
executeAsync: ExecuteAsyncQuery
Defined in: packages/react-native-nitro-sqlite/src/types.ts:377
Execute within this transaction on a background thread.
executeLazy
executeLazy: ExecuteLazyQuery
Defined in: packages/react-native-nitro-sqlite/src/types.ts:379
Execute within this transaction on the calling thread with on-demand row conversion.
executeLazyAsync
executeLazyAsync: ExecuteLazyAsyncQuery
Defined in: packages/react-native-nitro-sqlite/src/types.ts:381
Execute within this transaction on a background thread with on-demand row conversion.
executeRaw
executeRaw: ExecuteRawQuery
Defined in: packages/react-native-nitro-sqlite/src/types.ts:383
Execute within this transaction on the calling thread, returning rows as arrays of column values.
executeRawAsync
executeRawAsync: ExecuteRawAsyncQuery
Defined in: packages/react-native-nitro-sqlite/src/types.ts:385
Execute within this transaction on a background thread, returning rows as arrays of column values.
Methods
commit()
commit(): NativeQueryResult
Defined in: packages/react-native-nitro-sqlite/src/types.ts:367
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(): NativeQueryResult
Defined in: packages/react-native-nitro-sqlite/src/types.ts:373
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.