Struct sea_orm::DatabaseTransaction [−][src]
pub struct DatabaseTransaction { /* fields omitted */ }Expand description
Defines a database transaction, whether it is an open transaction and the type of backend to use
Implementations
Trait Implementations
fn transaction<'life0, 'async_trait, F, T, E>(
&'life0 self,
_callback: F
) -> Pin<Box<dyn Future<Output = Result<T, TransactionError<E>>> + Send + 'async_trait>> where
F: for<'c> FnOnce(&'c DatabaseTransaction) -> Pin<Box<dyn Future<Output = Result<T, E>> + Send + 'c>> + Send,
T: Send,
E: Error + Send,
F: 'async_trait,
T: 'async_trait,
E: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn transaction<'life0, 'async_trait, F, T, E>(
&'life0 self,
_callback: F
) -> Pin<Box<dyn Future<Output = Result<T, TransactionError<E>>> + Send + 'async_trait>> where
F: for<'c> FnOnce(&'c DatabaseTransaction) -> Pin<Box<dyn Future<Output = Result<T, E>> + Send + 'c>> + Send,
T: Send,
E: Error + Send,
F: 'async_trait,
T: 'async_trait,
E: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Execute the function inside a transaction. If the function returns an error, the transaction will be rolled back. If it does not return an error, the transaction will be committed.
type Stream = TransactionStream<'a>
type Stream = TransactionStream<'a>
Create a stream for the QueryResult
Execute a Statement
Execute a Statement and return a query
Execute a Statement and return a collection Vec<QueryResult> on success
Execute a Statement and return a stream of results
Execute SQL BEGIN transaction.
Returns a Transaction that can be committed or rolled back Read more
Check if the connection supports RETURNING syntax on insert and update
Check if the connection is a test connection for the Mock database
Auto Trait Implementations
impl !RefUnwindSafe for DatabaseTransaction
impl Send for DatabaseTransaction
impl Sync for DatabaseTransaction
impl Unpin for DatabaseTransaction
impl !UnwindSafe for DatabaseTransaction
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more