Interface: TransactionOptions
Defined in: packages/core/src/protocol/transaction.ts:21
Extended by
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
autoCommit? | boolean | - | packages/core/src/protocol/transaction.ts:32 |
autoUpgradeReadOnly? | boolean | Client-side behavior, not part of the TPB: when a statement in a read-only transaction fails with "attempted update during read-only transaction", commit and reopen the transaction read-write (same isolation/wait) and replay that statement once. Applies to tx.query/run/execute; queryStream and prepared statements are not replayed. The upgrade is a real commit + new transaction: the snapshot moves forward and lazy Blob handles from before it become invalid; the transaction stays read-write afterwards (tx.autoUpgraded reports it). One-shot db.query/run/execute route through the same path, so a read-only defaultTransaction upgrades transparently there too. Default: the connection's autoUpgradeReadOnly option (false). | packages/core/src/protocol/transaction.ts:46 |
isolation? | IsolationLevel | - | packages/core/src/protocol/transaction.ts:22 |
readOnly? | boolean | - | packages/core/src/protocol/transaction.ts:23 |
wait? | number | boolean | Lock-wait behavior: number = wait up to that many seconds, then error; false = nowait (fail immediately); true = wait forever (Firebird's native default). Driver default when unset: 10 seconds (DEFAULT_LOCK_TIMEOUT_SECONDS) — so contention surfaces as a clear lock-timeout error instead of an unbounded hang. | packages/core/src/protocol/transaction.ts:31 |