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

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

Methods

impl<'a> Transaction<'a>
[src]

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

fn first<T: AsRef<str>>(&mut self, query: T) -> MyResult<Option<Row>>

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

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

fn first_exec<Q, P>(&mut self, query: Q, params: P) -> MyResult<Option<Row>> where Q: AsRef<str>, P: Into<Params>

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> Debug for Transaction<'a>
[src]

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

Formats the value using the given formatter.

impl<'a> Drop for Transaction<'a>
[src]

fn drop(&mut self)

Will rollback transaction.