Expand description
Backend-aware transaction-control helpers.
Lifted from copy.rs so that callers outside the copy module
(notably the CLI query command’s --begin/--commit/--rollback
wiring) can drive the same BEGIN / COMMIT / ROLLBACK statements
without depending on copy.rs internals.
The string-statement chosen per backend mirrors what copy.rs
already issues; Oracle has no explicit BEGIN (implicit txn), so
begin_transaction is a noop that still returns true so the
caller’s wrapping COMMIT/ROLLBACK at the end terminates the
implicit transaction.
Functions§
- begin_
transaction - Open a target-side transaction. Returns
trueif the BEGIN succeeded,falseif the backend rejected the statement (best- effort: the caller proceeds without a wrapping transaction). - commit_
transaction - Commit the wrapping transaction. Blocking: one synchronous
COMMITround-trip. - rollback_
transaction - Roll back the wrapping transaction. Blocking: one synchronous
ROLLBACKround-trip.