[−][src]Struct mysql::Transaction
Implementations
impl<'_> Transaction<'_>[src]
pub fn commit(self) -> Result<()>[src]
Will consume and commit transaction.
pub fn rollback(self) -> Result<()>[src]
Will consume and rollback transaction. You also can rely on Drop implementation but it
will swallow errors.
pub fn set_local_infile_handler(&mut self, handler: Option<LocalInfileHandler>)[src]
A way to override local infile handler for this transaction. Destructor of transaction will restore original handler.
pub fn affected_rows(&self) -> u64[src]
Returns the number of affected rows, reported by the server.
pub fn last_insert_id(&self) -> Option<u64>[src]
Returns the last insert id of the last query, if any.
pub fn warnings(&self) -> u16[src]
Returns the warnings count, reported by the server.
pub fn info_ref(&self) -> &[u8][src]
Info, reported by the server.
Will be empty if not defined.
pub fn info_str(&self) -> Cow<'_, str>[src]
Info, reported by the server.
Will be empty if not defined.
Trait Implementations
impl<'a> Debug for Transaction<'a>[src]
impl<'a> Drop for Transaction<'a>[src]
impl<'a> Queryable for Transaction<'a>[src]
pub fn query_iter<T: AsRef<str>>(
&mut self,
query: T
) -> Result<QueryResult<'_, '_, '_, Text>>[src]
&mut self,
query: T
) -> Result<QueryResult<'_, '_, '_, Text>>
pub fn prep<T: AsRef<str>>(&mut self, query: T) -> Result<Statement>[src]
pub fn close(&mut self, stmt: Statement) -> Result<()>[src]
pub fn exec_iter<S, P>(
&mut self,
stmt: S,
params: P
) -> Result<QueryResult<'_, '_, '_, Binary>> where
S: AsStatement,
P: Into<Params>, [src]
&mut self,
stmt: S,
params: P
) -> Result<QueryResult<'_, '_, '_, Binary>> where
S: AsStatement,
P: Into<Params>,
pub fn query<T, Q>(&mut self, query: Q) -> Result<Vec<T>> where
Q: AsRef<str>,
T: FromRow, [src]
Q: AsRef<str>,
T: FromRow,
pub fn query_opt<T, Q>(
&mut self,
query: Q
) -> Result<Vec<StdResult<T, FromRowError>>> where
Q: AsRef<str>,
T: FromRow, [src]
&mut self,
query: Q
) -> Result<Vec<StdResult<T, FromRowError>>> where
Q: AsRef<str>,
T: FromRow,
pub fn query_first<T, Q>(&mut self, query: Q) -> Result<Option<T>> where
Q: AsRef<str>,
T: FromRow, [src]
Q: AsRef<str>,
T: FromRow,
pub fn query_first_opt<T, Q>(
&mut self,
query: Q
) -> Result<Option<StdResult<T, FromRowError>>> where
Q: AsRef<str>,
T: FromRow, [src]
&mut self,
query: Q
) -> Result<Option<StdResult<T, FromRowError>>> where
Q: AsRef<str>,
T: FromRow,
pub fn query_map<T, F, Q, U>(&mut self, query: Q, f: F) -> Result<Vec<U>> where
Q: AsRef<str>,
T: FromRow,
F: FnMut(T) -> U, [src]
Q: AsRef<str>,
T: FromRow,
F: FnMut(T) -> U,
pub fn query_map_opt<T, F, Q, U>(&mut self, query: Q, f: F) -> Result<Vec<U>> where
Q: AsRef<str>,
T: FromRow,
F: FnMut(StdResult<T, FromRowError>) -> U, [src]
Q: AsRef<str>,
T: FromRow,
F: FnMut(StdResult<T, FromRowError>) -> U,
pub fn query_fold<T, F, Q, U>(&mut self, query: Q, init: U, f: F) -> Result<U> where
Q: AsRef<str>,
T: FromRow,
F: FnMut(U, T) -> U, [src]
Q: AsRef<str>,
T: FromRow,
F: FnMut(U, T) -> U,
pub fn query_fold_opt<T, F, Q, U>(
&mut self,
query: Q,
init: U,
f: F
) -> Result<U> where
Q: AsRef<str>,
T: FromRow,
F: FnMut(U, StdResult<T, FromRowError>) -> U, [src]
&mut self,
query: Q,
init: U,
f: F
) -> Result<U> where
Q: AsRef<str>,
T: FromRow,
F: FnMut(U, StdResult<T, FromRowError>) -> U,
pub fn query_drop<Q>(&mut self, query: Q) -> Result<()> where
Q: AsRef<str>, [src]
Q: AsRef<str>,
pub fn exec_batch<S, P, I>(&mut self, stmt: S, params: I) -> Result<()> where
Self: Sized,
S: AsStatement,
P: Into<Params>,
I: IntoIterator<Item = P>, [src]
Self: Sized,
S: AsStatement,
P: Into<Params>,
I: IntoIterator<Item = P>,
pub fn exec<T, S, P>(&mut self, stmt: S, params: P) -> Result<Vec<T>> where
S: AsStatement,
P: Into<Params>,
T: FromRow, [src]
S: AsStatement,
P: Into<Params>,
T: FromRow,
pub fn exec_opt<T, S, P>(
&mut self,
stmt: S,
params: P
) -> Result<Vec<StdResult<T, FromRowError>>> where
S: AsStatement,
P: Into<Params>,
T: FromRow, [src]
&mut self,
stmt: S,
params: P
) -> Result<Vec<StdResult<T, FromRowError>>> where
S: AsStatement,
P: Into<Params>,
T: FromRow,
pub fn exec_first<T, S, P>(&mut self, stmt: S, params: P) -> Result<Option<T>> where
S: AsStatement,
P: Into<Params>,
T: FromRow, [src]
S: AsStatement,
P: Into<Params>,
T: FromRow,
pub fn exec_first_opt<T, S, P>(
&mut self,
stmt: S,
params: P
) -> Result<Option<StdResult<T, FromRowError>>> where
S: AsStatement,
P: Into<Params>,
T: FromRow, [src]
&mut self,
stmt: S,
params: P
) -> Result<Option<StdResult<T, FromRowError>>> where
S: AsStatement,
P: Into<Params>,
T: FromRow,
pub fn exec_map<T, S, P, F, U>(
&mut self,
stmt: S,
params: P,
f: F
) -> Result<Vec<U>> where
S: AsStatement,
P: Into<Params>,
T: FromRow,
F: FnMut(T) -> U, [src]
&mut self,
stmt: S,
params: P,
f: F
) -> Result<Vec<U>> where
S: AsStatement,
P: Into<Params>,
T: FromRow,
F: FnMut(T) -> U,
pub fn exec_map_opt<T, S, P, F, U>(
&mut self,
stmt: S,
params: P,
f: F
) -> Result<Vec<U>> where
S: AsStatement,
P: Into<Params>,
T: FromRow,
F: FnMut(StdResult<T, FromRowError>) -> U, [src]
&mut self,
stmt: S,
params: P,
f: F
) -> Result<Vec<U>> where
S: AsStatement,
P: Into<Params>,
T: FromRow,
F: FnMut(StdResult<T, FromRowError>) -> U,
pub fn exec_fold<T, S, P, U, F>(
&mut self,
stmt: S,
params: P,
init: U,
f: F
) -> Result<U> where
S: AsStatement,
P: Into<Params>,
T: FromRow,
F: FnMut(U, T) -> U, [src]
&mut self,
stmt: S,
params: P,
init: U,
f: F
) -> Result<U> where
S: AsStatement,
P: Into<Params>,
T: FromRow,
F: FnMut(U, T) -> U,
pub fn exec_fold_opt<T, S, P, U, F>(
&mut self,
stmt: S,
params: P,
init: U,
f: F
) -> Result<U> where
S: AsStatement,
P: Into<Params>,
T: FromRow,
F: FnMut(U, StdResult<T, FromRowError>) -> U, [src]
&mut self,
stmt: S,
params: P,
init: U,
f: F
) -> Result<U> where
S: AsStatement,
P: Into<Params>,
T: FromRow,
F: FnMut(U, StdResult<T, FromRowError>) -> U,
pub fn exec_drop<S, P>(&mut self, stmt: S, params: P) -> Result<()> where
S: AsStatement,
P: Into<Params>, [src]
S: AsStatement,
P: Into<Params>,
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,
pub 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.
pub 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.
pub 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>,