Struct mysql_async::Transaction
[−]
[src]
pub struct Transaction { /* fields omitted */ }
Wrapper for in-transaction connection.
Methods
impl Transaction
[src]
fn commit(self) -> Commit
Returns future that commits transaction and resolves to Conn
.
fn rollback(self) -> Rollback
Returns future that rolls back transaction and resolves to Conn
.
fn query<Q: AsRef<str>>(self, query: Q) -> TransQuery
Returns future that executes query and resolves to TransTextQueryResult
.
fn first<R, Q>(self, query: Q) -> TransFirst<R> where
R: FromRow,
Q: AsRef<str>,
R: FromRow,
Q: AsRef<str>,
Returns future that executes query and resolves to (Option<R>, Transaction)
.
Where Option<R>
is the first row of a query execution result (if any).
fn prep_exec<Q: AsRef<str>, P: Into<Params>>(
self,
query: Q,
params: P
) -> TransPrepExec
self,
query: Q,
params: P
) -> TransPrepExec
Returns future that prepares and executes statement and resolves to TransBinQueryResult
.
fn first_exec<R, Q, P>(self, query: Q, params: P) -> TransFirstExec<R> where
R: FromRow,
Q: AsRef<str>,
P: Into<Params>,
R: FromRow,
Q: AsRef<str>,
P: Into<Params>,
Returns future that prepares and executes statement and resolves to (Option<R>, Transaction)
.
Where Option<R>
is the first row of a statement execution result (if any).
fn batch_exec<Q, P>(self, query: Q, params_vec: Vec<P>) -> TransBatchExec where
Q: AsRef<str>,
P: Into<Params>,
Q: AsRef<str>,
P: Into<Params>,
Returns future that prepares and executes statement and resolves to Transaction
.
All results will be dropped.