Struct mysql::Transaction
[−]
[src]
pub struct Transaction<'a> { /* fields omitted */ }
Methods
impl<'a> Transaction<'a>
[src]
fn query<T: AsRef<str>>(&mut self, query: T) -> MyResult<QueryResult>
See Conn::query
.
fn first<T: AsRef<str>>(&mut self, query: T) -> MyResult<Option<Row>>
See Conn::first
.
fn prepare<T: AsRef<str>>(&mut self, query: T) -> MyResult<Stmt>
See Conn::prepare
.
fn prep_exec<A: AsRef<str>, T: Into<Params>>(
&mut self,
query: A,
params: T
) -> MyResult<QueryResult>
&mut self,
query: A,
params: T
) -> MyResult<QueryResult>
See Conn::prep_exec
.
fn first_exec<Q, P>(&mut self, query: Q, params: P) -> MyResult<Option<Row>> where
Q: AsRef<str>,
P: Into<Params>,
Q: AsRef<str>,
P: Into<Params>,
See Conn::first_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.
fn set_local_infile_handler(&mut self, handler: Option<LocalInfileHandler>)
A way to override local infile handler for this transaction. Destructor of transaction will restore original handler.
Trait Implementations
impl<'a> Debug for Transaction<'a>
[src]
impl<'a> GenericConnection for Transaction<'a>
[src]
fn query<T: AsRef<str>>(&mut self, query: T) -> MyResult<QueryResult>
See Conn#query
. Read more
fn first<T: AsRef<str>>(&mut self, query: T) -> MyResult<Option<Row>>
See Conn#first
. Read more
fn prepare<T: AsRef<str>>(&mut self, query: T) -> MyResult<Stmt>
See Conn#prepare
. Read more
fn prep_exec<A, T>(&mut self, query: A, params: T) -> MyResult<QueryResult> where
A: AsRef<str>,
T: Into<Params>,
A: AsRef<str>,
T: Into<Params>,
See Conn#prep_exec
. Read more
fn first_exec<Q, P>(&mut self, query: Q, params: P) -> MyResult<Option<Row>> where
Q: AsRef<str>,
P: Into<Params>,
Q: AsRef<str>,
P: Into<Params>,
See Conn#first_exec
. Read more
impl<'a> Drop for Transaction<'a>
[src]
fn drop(&mut self)
Will rollback transaction.