diesel_async

Trait SimpleAsyncConnection

Source
pub trait SimpleAsyncConnection {
    // Required method
    fn batch_execute<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        query: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = QueryResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Perform simple operations on a backend.

You should likely use AsyncConnection instead.

Required Methods§

Source

fn batch_execute<'life0, 'life1, 'async_trait>( &'life0 mut self, query: &'life1 str, ) -> Pin<Box<dyn Future<Output = QueryResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Execute multiple SQL statements within the same string.

This function is used to execute migrations, which may contain more than one SQL statement.

Implementors§

Source§

impl SimpleAsyncConnection for AsyncMysqlConnection

Available on crate feature mysql only.
Source§

impl SimpleAsyncConnection for AsyncPgConnection

Available on crate feature postgres only.
Source§

impl<C> SimpleAsyncConnection for SyncConnectionWrapper<C>
where C: Connection + 'static,

Available on crate feature sync-connection-wrapper only.
Source§

impl<C> SimpleAsyncConnection for C

Available on crate feature pool only.