Struct diesel::connection::AnsiTransactionManager
[−]
[src]
pub struct AnsiTransactionManager { /* fields omitted */ }
An implementation of TransactionManager
which can be used for backends
which use ANSI standard syntax for savepoints such as SQLite and PostgreSQL.
Methods
impl AnsiTransactionManager
[src]
fn new() -> Self
Trait Implementations
impl Default for AnsiTransactionManager
[src]
fn default() -> AnsiTransactionManager
Returns the "default value" for a type. Read more
impl<Conn> TransactionManager<Conn> for AnsiTransactionManager where Conn: Connection,
Conn::Backend: UsesAnsiSavepointSyntax
[src]
Conn::Backend: UsesAnsiSavepointSyntax
fn begin_transaction(&self, conn: &Conn) -> QueryResult<()>
Begin a new transaction. If the transaction depth is greater than 0, this should create a savepoint instead. This function is expected to increment the transaction depth by 1. Read more
fn rollback_transaction(&self, conn: &Conn) -> QueryResult<()>
Rollback the inner-most transcation. If the transaction depth is greater than 1, this should rollback to the most recent savepoint. This function is expected to decrement the transaction depth by 1. Read more
fn commit_transaction(&self, conn: &Conn) -> QueryResult<()>
Commit the inner-most transcation. If the transaction depth is greater than 1, this should release the most recent savepoint. This function is expected to decrement the transaction depth by 1. Read more
fn get_transaction_depth(&self) -> u32
Fetch the current transaction depth. Used to ensure that begin_test_transaction
is not called when already inside of a transaction. Read more