Expand description
SQL transactions
A transaction encapsulates all the mutable functionality provided by the SQL database, and allows for mutable operations to be combined into complex updates that affect the main database atomically. A transaction also provides all the immutable query functionality of a regular database connection, so that the updated state of the database can be queried midway through a transaction.
Macrosยง
- impl_
tuple_ ๐params
Structsยง
- Pool
Metrics ๐ - Prune
- Marker type indicating a transaction used for pruning deletes.
- Read
- Marker type indicating a transaction with read-only access to the database.
- Transaction
- An atomic SQL transaction.
- Transaction
Metrics ๐Guard - Write
- Marker type indicating a transaction with read-write access to the database.
Enumsยง
- Close
Type ๐
Staticsยง
- NO_
DEFERRABLE_ ๐ON_ READ - When set to
true, read transactions begin withSET TRANSACTION ISOLATION LEVEL SERIALIZABLE, READ ONLY(noDEFERRABLE), so they start immediately instead of waiting for a safe serializable snapshot.
Traitsยง
- Executor
- A type that contains or can provide a database connection to use for executing queries against the database.
- Fixed
Length Params - A collection of parameters with a statically known length.
- Params
- A collection of parameters which can be bound to a SQL query.
- Transaction
Mode - Trait for marker types indicating what type of access a transaction has to the database.
Functionsยง
- build_
where_ in - query
- query_
as - set_
no_ deferrable_ on_ read - Configure whether read transactions on Postgres should omit
DEFERRABLE.