pub struct AnsiTransactionManager { /* private fields */ }
Expand description
An implementation of TransactionManager
which can be used for backends
which use ANSI standard syntax for savepoints such as SQLite and PostgreSQL.
Implementations§
Source§impl AnsiTransactionManager
impl AnsiTransactionManager
Sourcepub fn begin_transaction_sql<Conn>(
&self,
conn: &Conn,
sql: &str,
) -> QueryResult<()>where
Conn: SimpleConnection,
pub fn begin_transaction_sql<Conn>(
&self,
conn: &Conn,
sql: &str,
) -> QueryResult<()>where
Conn: SimpleConnection,
Begin a transaction with custom SQL
This is used by connections to implement more complex transaction APIs to set things such as isolation levels. Returns an error if already inside of a transaction.
Trait Implementations§
Source§impl Default for AnsiTransactionManager
impl Default for AnsiTransactionManager
Source§fn default() -> AnsiTransactionManager
fn default() -> AnsiTransactionManager
Returns the “default value” for a type. Read more
Source§impl<Conn> TransactionManager<Conn> for AnsiTransactionManager
impl<Conn> TransactionManager<Conn> for AnsiTransactionManager
Source§fn commit_transaction(&self, conn: &Conn) -> QueryResult<()>
fn commit_transaction(&self, conn: &Conn) -> QueryResult<()>
If the transaction fails to commit due to a SerializationFailure
, a rollback will be attempted.
If the rollback succeeds, the original error will be returned, otherwise the error generated by
the rollback will be returned. In the second case the connection should be considered broken
as it contains a uncommitted unabortable open transaction.
Source§fn begin_transaction(&self, conn: &Conn) -> QueryResult<()>
fn begin_transaction(&self, conn: &Conn) -> QueryResult<()>
Begin a new transaction or savepoint Read more
Source§fn rollback_transaction(&self, conn: &Conn) -> QueryResult<()>
fn rollback_transaction(&self, conn: &Conn) -> QueryResult<()>
Rollback the inner-most transaction or savepoint Read more
Source§fn get_transaction_depth(&self) -> u32
fn get_transaction_depth(&self) -> u32
Fetch the current transaction depth Read more
Auto Trait Implementations§
impl !Freeze for AnsiTransactionManager
impl !RefUnwindSafe for AnsiTransactionManager
impl Send for AnsiTransactionManager
impl !Sync for AnsiTransactionManager
impl Unpin for AnsiTransactionManager
impl UnwindSafe for AnsiTransactionManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more