Struct mysql::conn::Transaction [] [src]

pub struct Transaction<'a> {
    // some fields omitted
}

Methods

impl<'a> Transaction<'a>

fn query<'c, T: AsRef<str> + 'c>(&'c mut self, query: T) -> MyResult<QueryResult<'c>>

fn prepare<'c, T: AsRef<str> + 'c>(&'c mut self, query: T) -> MyResult<Stmt<'c>>

fn prep_exec<'c, A: AsRef<str> + 'c, T: ToRow>(&'c mut self, query: A, params: T) -> MyResult<QueryResult<'c>>

fn commit(self) -> MyResult<()>

Will consume and commit transaction.

fn rollback(self) -> MyResult<()>

Will consume and rollback transaction. You also can rely on Drop implementation but it will swallow errors.

Trait Implementations

impl<'a> Drop for Transaction<'a>

fn drop(&mut self)

Derived Implementations

impl<'a> Debug for Transaction<'a>

fn fmt(&self, __arg_0: &mut Formatter) -> Result