Transaction

Trait Transaction 

Source
pub trait Transaction: Send + Sync {
    // Required methods
    fn commit<'async_trait>(
        self,
    ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn rollback<'async_trait>(
        self,
    ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn execute_query<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        query: &'life1 str,
        params: &'life2 [&'life3 dyn QueryParam],
    ) -> Pin<Box<dyn Future<Output = Result<QueryResult, DatabaseError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             Self: 'async_trait;
}

Required Methods§

Source

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

Source

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

Source

fn execute_query<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, query: &'life1 str, params: &'life2 [&'life3 dyn QueryParam], ) -> Pin<Box<dyn Future<Output = Result<QueryResult, DatabaseError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, Self: 'async_trait,

Implementations on Foreign Types§

Source§

impl Transaction for PostgresTransaction

Source§

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

Source§

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

Source§

fn execute_query<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _query: &'life1 str, _params: &'life2 [&'life3 dyn QueryParam], ) -> Pin<Box<dyn Future<Output = Result<QueryResult, DatabaseError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, PostgresTransaction: 'async_trait,

Implementors§