Skip to main content

Module tx_interactive

Module tx_interactive 

Source

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 Executor works.
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.