Struct diesel::mysql::MysqlConnection [−][src]
pub struct MysqlConnection { /* fields omitted */ }A connection to a MySQL database. Connection URLs should be in the form
mysql://[user[:password]@]host/database_name
Trait Implementations
impl Send for MysqlConnection[src]
impl Send for MysqlConnectionimpl SimpleConnection for MysqlConnection[src]
impl SimpleConnection for MysqlConnectionfn batch_execute(&self, query: &str) -> QueryResult<()>[src]
fn batch_execute(&self, query: &str) -> QueryResult<()>Execute multiple SQL statements within the same string. Read more
impl Connection for MysqlConnection[src]
impl Connection for MysqlConnectiontype Backend = Mysql
The backend this type connects to
type TransactionManager = AnsiTransactionManager
fn establish(database_url: &str) -> ConnectionResult<Self>[src]
fn establish(database_url: &str) -> ConnectionResult<Self>Establishes a new connection to the database Read more
fn transaction<T, E, F>(&self, f: F) -> Result<T, E> where
F: FnOnce() -> Result<T, E>,
E: From<Error>, [src]
fn transaction<T, E, F>(&self, f: F) -> Result<T, E> where
F: FnOnce() -> Result<T, E>,
E: From<Error>, Executes the given function inside of a database transaction Read more
fn begin_test_transaction(&self) -> QueryResult<()>[src]
fn begin_test_transaction(&self) -> QueryResult<()>Creates a transaction that will never be committed. This is useful for tests. Panics if called while inside of a transaction. Read more
fn test_transaction<T, E, F>(&self, f: F) -> T where
F: FnOnce() -> Result<T, E>,
E: Debug, [src]
fn test_transaction<T, E, F>(&self, f: F) -> T where
F: FnOnce() -> Result<T, E>,
E: Debug, Executes the given function inside a transaction, but does not commit it. Panics if the given function returns an error. Read more
Auto Trait Implementations
impl !Sync for MysqlConnection
impl !Sync for MysqlConnection