pub trait SimpleAsyncConnection {
// Required method
fn batch_execute(
&mut self,
query: &str,
) -> impl Future<Output = QueryResult<()>> + Send;
}
Expand description
Perform simple operations on a backend.
You should likely use AsyncConnection
instead.
Required Methods§
Sourcefn batch_execute(
&mut self,
query: &str,
) -> impl Future<Output = QueryResult<()>> + Send
fn batch_execute( &mut self, query: &str, ) -> impl Future<Output = QueryResult<()>> + Send
Execute multiple SQL statements within the same string.
This function is used to execute migrations, which may contain more than one SQL statement.
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§
impl SimpleAsyncConnection for AsyncMysqlConnection
Available on crate feature
mysql
only.impl SimpleAsyncConnection for AsyncPgConnection
Available on crate feature
postgres
only.impl<C> SimpleAsyncConnection for C
Available on crate feature
pool
only.