Trait SimpleAsyncConnection

Source
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§

Source

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§

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 C

Available on crate feature pool only.