diesel::connection

Trait SimpleConnection

Source
pub trait SimpleConnection {
    // Required method
    fn batch_execute(&mut self, query: &str) -> QueryResult<()>;
}
Expand description

Perform simple operations on a backend.

You should likely use Connection instead.

Required Methods§

Source

fn batch_execute(&mut self, query: &str) -> QueryResult<()>

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 SimpleConnection for MysqlConnection

Available on crate features mysql and mysql_backend only.
Source§

impl SimpleConnection for PgConnection

Available on crate features postgres and postgres_backend only.
Source§

impl SimpleConnection for SqliteConnection

Available on crate feature sqlite only.
Source§

impl<M> SimpleConnection for PooledConnection<M>
where M: ManageConnection, M::Connection: R2D2Connection + Send + 'static,

Available on crate feature r2d2 only.