Skip to main content

DatabaseExecutor

Trait DatabaseExecutor 

Source
pub trait DatabaseExecutor {
    // Required methods
    fn query_all<'life0, 'async_trait, T, Q>(
        &'life0 self,
        sql: Q,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<T>, Error>> + 'async_trait>>
       where T: DeserializeOwned + 'async_trait,
             Q: Query + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn query_first<'life0, 'async_trait, T, Q>(
        &'life0 self,
        sql: Q,
    ) -> Pin<Box<dyn Future<Output = Result<Option<T>, Error>> + 'async_trait>>
       where T: DeserializeOwned + 'async_trait,
             Q: Query + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn execute<'life0, 'async_trait, Q>(
        &'life0 self,
        sql: Q,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
       where Q: Query + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn execute_batch<'life0, 'async_trait, Q>(
        &'life0 self,
        sqls: Vec<Q>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
       where Q: Query + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn query_all<'life0, 'async_trait, T, Q>( &'life0 self, sql: Q, ) -> Pin<Box<dyn Future<Output = Result<Vec<T>, Error>> + 'async_trait>>
where T: DeserializeOwned + 'async_trait, Q: Query + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Source

fn query_first<'life0, 'async_trait, T, Q>( &'life0 self, sql: Q, ) -> Pin<Box<dyn Future<Output = Result<Option<T>, Error>> + 'async_trait>>
where T: DeserializeOwned + 'async_trait, Q: Query + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Source

fn execute<'life0, 'async_trait, Q>( &'life0 self, sql: Q, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Q: Query + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Source

fn execute_batch<'life0, 'async_trait, Q>( &'life0 self, sqls: Vec<Q>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Q: Query + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§