[−][src]Struct mysql_async::Transaction
This struct represents MySql transaction.
Transaction
is just a sugar for START TRANSACTION
, ROLLBACK
and COMMIT
queries, so one
should note that it is easy to mess things up calling this queries manually. Also you will get
NestedTransaction
error if you call transaction.start_transaction(_)
.
Methods
impl<'a> Transaction<'a>
[src]
pub async fn commit(__arg0: Self) -> Result<()>
[src]
Performs COMMIT
query.
pub async fn rollback(__arg0: Self) -> Result<()>
[src]
Performs ROLLBACK
query.
Trait Implementations
impl<'a> Debug for Transaction<'a>
[src]
impl<'_> Drop for Transaction<'_>
[src]
impl<'_> Queryable for Transaction<'_>
[src]
fn ping(&mut self) -> BoxFuture<()>
[src]
fn query_iter<'a, Q>(
&'a mut self,
query: Q
) -> BoxFuture<'a, QueryResult<'a, 'static, TextProtocol>> where
Q: AsRef<str> + Send + Sync + 'a,
[src]
&'a mut self,
query: Q
) -> BoxFuture<'a, QueryResult<'a, 'static, TextProtocol>> where
Q: AsRef<str> + Send + Sync + 'a,
fn prep<'a, Q>(&'a mut self, query: Q) -> BoxFuture<'a, Statement> where
Q: AsRef<str> + Sync + Send + 'a,
[src]
Q: AsRef<str> + Sync + Send + 'a,
fn close(&mut self, stmt: Statement) -> BoxFuture<()>
[src]
fn exec_iter<'a: 's, 's, Q: ?Sized, P>(
&'a mut self,
stmt: &'s Q,
params: P
) -> BoxFuture<'s, QueryResult<'a, 'static, BinaryProtocol>> where
Q: StatementLike + 'a,
P: Into<Params>,
[src]
&'a mut self,
stmt: &'s Q,
params: P
) -> BoxFuture<'s, QueryResult<'a, 'static, BinaryProtocol>> where
Q: StatementLike + 'a,
P: Into<Params>,
fn query<'a, T, Q>(&'a mut self, query: Q) -> BoxFuture<'a, Vec<T>> where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
[src]
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
fn query_first<'a, T, Q>(&'a mut self, query: Q) -> BoxFuture<'a, Option<T>> where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
[src]
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
fn query_map<'a, T, F, Q, U>(
&'a mut self,
query: Q,
f: F
) -> BoxFuture<'a, Vec<U>> where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
F: FnMut(T) -> U + Send + 'a,
U: Send,
[src]
&'a mut self,
query: Q,
f: F
) -> BoxFuture<'a, Vec<U>> where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
F: FnMut(T) -> U + Send + 'a,
U: Send,
fn query_fold<'a, T, F, Q, U>(
&'a mut self,
query: Q,
init: U,
f: F
) -> BoxFuture<'a, U> where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
F: FnMut(U, T) -> U + Send + 'a,
U: Send + 'a,
[src]
&'a mut self,
query: Q,
init: U,
f: F
) -> BoxFuture<'a, U> where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
F: FnMut(U, T) -> U + Send + 'a,
U: Send + 'a,
fn query_drop<'a, Q>(&'a mut self, query: Q) -> BoxFuture<'a, ()> where
Q: AsRef<str> + Send + Sync + 'a,
[src]
Q: AsRef<str> + Send + Sync + 'a,
fn exec_batch<'a: 'b, 'b, S: ?Sized, P, I>(
&'a mut self,
stmt: &'b S,
params_iter: I
) -> BoxFuture<'b, ()> where
S: StatementLike + 'b,
I: IntoIterator<Item = P> + Send + 'b,
I::IntoIter: Send,
P: Into<Params> + Send,
[src]
&'a mut self,
stmt: &'b S,
params_iter: I
) -> BoxFuture<'b, ()> where
S: StatementLike + 'b,
I: IntoIterator<Item = P> + Send + 'b,
I::IntoIter: Send,
P: Into<Params> + Send,
fn exec<'a: 'b, 'b, T, S: ?Sized, P>(
&'a mut self,
stmt: &'b S,
params: P
) -> BoxFuture<'b, Vec<T>> where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
[src]
&'a mut self,
stmt: &'b S,
params: P
) -> BoxFuture<'b, Vec<T>> where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
fn exec_first<'a: 'b, 'b, T, S: ?Sized, P>(
&'a mut self,
stmt: &'b S,
params: P
) -> BoxFuture<'b, Option<T>> where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
[src]
&'a mut self,
stmt: &'b S,
params: P
) -> BoxFuture<'b, Option<T>> where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
fn exec_map<'a: 'b, 'b, T, S: ?Sized, P, U, F>(
&'a mut self,
stmt: &'b S,
params: P,
f: F
) -> BoxFuture<'b, Vec<U>> where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
F: FnMut(T) -> U + Send + 'a,
U: Send + 'a,
[src]
&'a mut self,
stmt: &'b S,
params: P,
f: F
) -> BoxFuture<'b, Vec<U>> where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
F: FnMut(T) -> U + Send + 'a,
U: Send + 'a,
fn exec_fold<'a: 'b, 'b, T, S: ?Sized, P, U, F>(
&'a mut self,
stmt: &'b S,
params: P,
init: U,
f: F
) -> BoxFuture<'b, U> where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
F: FnMut(U, T) -> U + Send + 'a,
U: Send + 'a,
[src]
&'a mut self,
stmt: &'b S,
params: P,
init: U,
f: F
) -> BoxFuture<'b, U> where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
F: FnMut(U, T) -> U + Send + 'a,
U: Send + 'a,
fn exec_drop<'a: 'b, 'b, S: ?Sized, P>(
&'a mut self,
stmt: &'b S,
params: P
) -> BoxFuture<'b, ()> where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
[src]
&'a mut self,
stmt: &'b S,
params: P
) -> BoxFuture<'b, ()> where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
impl<'a, 't> ToConnection<'a, 't> for &'a mut Transaction<'t>
[src]
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Transaction<'a>
impl<'a> Send for Transaction<'a>
impl<'a> Sync for Transaction<'a>
impl<'a> Unpin for Transaction<'a>
impl<'a> !UnwindSafe for Transaction<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,