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>>
See MyConn#query
.
fn prepare<'c, T: AsRef<str> + 'c>(&'c mut self, query: T) -> MyResult<Stmt<'c>>
See MyConn#prepare
.
fn prep_exec<'c, A: AsRef<str> + 'c, T: ToRow>(&'c mut self, query: A, params: T) -> MyResult<QueryResult<'c>>
See MyConn#prep_exec
.
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.