Trait diesel_async::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§
sourcefn 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,
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§
impl SimpleAsyncConnection for AsyncMysqlConnection
Available on crate feature
mysql
only.impl SimpleAsyncConnection for AsyncPgConnection
Available on crate feature
postgres
only.impl<C> SimpleAsyncConnection for Cwhere C: DerefMut + Send, C::Target: SimpleAsyncConnection + Send,
Available on crate features
deadpool
or bb8
or mobc
or r2d2
only.