Functionsยง
- builder_
drop_ rolls_ back - TransactionBuilder auto-rolls back on drop just like a regular transaction.
- builder_
on_ connection_ commit - TransactionBuilder from Connection commits data like a regular transaction.
- builder_
on_ db_ commit - TransactionBuilder from Db commits data like a regular transaction.
- builder_
with_ all_ options - TransactionBuilder with both isolation and read_only sends both options.
- builder_
with_ isolation_ level - TransactionBuilder with isolation level sends the correct option to the driver.
- builder_
with_ read_ only - TransactionBuilder with read_only sends the correct option to the driver.
- cancel_
queued_ commit_ keeps_ connection_ reusable - Cancelling a queued commit keeps the connection reusable.
- commit_
failure_ rolls_ back_ before_ connection_ reuse - A failed commit rolls back before the connection returns to the pool.
- commit_
persists_ data - Data created inside a committed transaction is visible afterwards.
- delete_
rolled_ back - Deletes inside a rolled-back transaction are discarded.
- driver_
sees_ begin_ commit - Verify the driver receives BEGIN, statements, and COMMIT in the right order.
- driver_
sees_ begin_ rollback - Verify the driver receives BEGIN and ROLLBACK when rolled back.
- drop_
without_ finalize_ rolls_ back - Dropping a transaction without commit or rollback automatically rolls back.
- multi_
op_ inside_ tx_ uses_ savepoints - When a multi-op statement (e.g. create with association) runs inside an interactive transaction, the engine wraps it in SAVEPOINT/RELEASE instead of BEGIN/COMMIT.
- multiple_
ops_ in_ transaction - Multiple operations inside a single transaction are all committed together.
- nested_
commit_ both - A committed nested transaction (savepoint) persists when the outer transaction also commits.
- nested_
driver_ sees_ rollback_ to_ savepoint - Verify the driver log when a nested transaction is rolled back shows ROLLBACK TO SAVEPOINT.
- nested_
driver_ sees_ savepoint_ ops - Verify the driver log for a nested transaction shows SAVEPOINT / RELEASE SAVEPOINT around the inner work.
- nested_
drop_ rolls_ back_ savepoint - Dropping a nested transaction without finalize rolls back just that savepoint.
- nested_
rollback_ inner - Rolling back a nested transaction discards only its changes; the outer transaction can still commit its own.
- nested_
rollback_ outer - Rolling back the outer transaction discards everything, including changes from an already-committed nested transaction.
- read_
your_ writes - Read-your-writes: data created inside a transaction is visible within it before commit.
- rollback_
discards_ data - Data created inside a rolled-back transaction is not visible.
- rollback_
failure_ retries_ before_ connection_ reuse - A failed rollback is retried before the connection returns to the pool.
- transaction_
via_ dyn_ executor - Calling
.transaction()through&mut dyn Executorworks. - two_
sequential_ nested_ transactions - Two sequential nested transactions: first committed, second rolled back. Only data from the first survives.
- update_
inside_ transaction - Updates inside a transaction are committed.
- update_
rolled_ back - Updates inside a rolled-back transaction are discarded.