TransactionSession

Trait TransactionSession 

Source
pub trait TransactionSession {
    // Required methods
    fn commit<'async_trait>(
        self,
    ) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn rollback<'async_trait>(
        self,
    ) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>
       where Self: 'async_trait;
}
Expand description

Represents an open transaction

Required Methods§

Source

fn commit<'async_trait>( self, ) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>
where Self: 'async_trait,

Commit a transaction

Source

fn rollback<'async_trait>( self, ) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>
where Self: 'async_trait,

Rolls back a transaction explicitly

Implementors§