Struct diesel::connection::AnsiTransactionManager [−][src]
pub struct AnsiTransactionManager { /* fields omitted */ }
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
pub 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
Returns the “default value” for a type. Read more
impl<Conn> TransactionManager<Conn> for AnsiTransactionManager where
Conn: Connection,
Conn::Backend: UsesAnsiSavepointSyntax,
impl<Conn> TransactionManager<Conn> for AnsiTransactionManager where
Conn: Connection,
Conn::Backend: UsesAnsiSavepointSyntax,
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.
Begin a new transaction or savepoint Read more
Rollback the inner-most transaction or savepoint Read more
Fetch the current transaction depth Read more