[−][src]Struct diesel::mysql::MysqlConnection
A connection to a MySQL database. Connection URLs should be in the form
mysql://[user[:password]@]host/database_name
Trait Implementations
impl SimpleConnection for MysqlConnection
[src]
fn batch_execute(&self, query: &str) -> QueryResult<()>
[src]
impl Connection for MysqlConnection
[src]
type Backend = Mysql
The backend this type connects to
type TransactionManager = AnsiTransactionManager
fn establish(database_url: &str) -> ConnectionResult<Self>
[src]
fn transaction<T, E, F>(&self, f: F) -> Result<T, E> where
F: FnOnce() -> Result<T, E>,
E: From<Error>,
[src]
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]
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]
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
impl<Changes, Output> UpdateAndFetchResults<Changes, Output> for MysqlConnection where
Changes: Copy + Identifiable,
Changes: AsChangeset<Target = <Changes as HasTable>::Table> + IntoUpdateTarget,
Changes::Table: FindDsl<Changes::Id>,
Update<Changes, Changes>: ExecuteDsl<MysqlConnection>,
Find<Changes::Table, Changes::Id>: LoadQuery<MysqlConnection, Output>,
[src]
Changes: Copy + Identifiable,
Changes: AsChangeset<Target = <Changes as HasTable>::Table> + IntoUpdateTarget,
Changes::Table: FindDsl<Changes::Id>,
Update<Changes, Changes>: ExecuteDsl<MysqlConnection>,
Find<Changes::Table, Changes::Id>: LoadQuery<MysqlConnection, Output>,
fn update_and_fetch(&self, changeset: Changes) -> QueryResult<Output>
[src]
impl Send for MysqlConnection
[src]
Auto Trait Implementations
impl Unpin for MysqlConnection
impl !Sync for MysqlConnection
impl UnwindSafe for MysqlConnection
impl !RefUnwindSafe for MysqlConnection
Blanket Implementations
impl<T> IntoSql for T
[src]
fn into_sql<T>(self) -> AsExprOf<Self, T> where
Self: AsExpression<T> + Sized,
[src]
Self: AsExpression<T> + Sized,
Convert self
to an expression for Diesel's query builder. Read more
fn as_sql<'a, T>(&'a self) -> AsExprOf<&'a Self, T> where
&'a Self: AsExpression<T>,
[src]
&'a Self: AsExpression<T>,
Convert &self
to an expression for Diesel's query builder. Read more
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,