[−][src]Struct mysql::Transaction
Methods
impl<'a> Transaction<'a>
[src]
pub fn query<T: AsRef<str>>(&mut self, query: T) -> Result<QueryResult>
[src]
See Conn::query
.
pub fn first<T: AsRef<str>, U: FromRow>(
&mut self,
query: T
) -> Result<Option<U>>
[src]
&mut self,
query: T
) -> Result<Option<U>>
See Conn::first
.
pub fn prepare<T: AsRef<str>>(&mut self, query: T) -> Result<Stmt>
[src]
See Conn::prepare
.
pub fn prep_exec<A: AsRef<str>, T: Into<Params>>(
&mut self,
query: A,
params: T
) -> Result<QueryResult>
[src]
&mut self,
query: A,
params: T
) -> Result<QueryResult>
See Conn::prep_exec
.
pub fn first_exec<Q, P, T>(&mut self, query: Q, params: P) -> Result<Option<T>> where
Q: AsRef<str>,
P: Into<Params>,
T: FromRow,
[src]
Q: AsRef<str>,
P: Into<Params>,
T: FromRow,
See Conn::first_exec
.
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.
Trait Implementations
impl<'a> GenericConnection for Transaction<'a>
[src]
fn query<T: AsRef<str>>(&mut self, query: T) -> Result<QueryResult>
[src]
fn first<T: AsRef<str>, U: FromRow>(&mut self, query: T) -> Result<Option<U>>
[src]
fn prepare<T: AsRef<str>>(&mut self, query: T) -> Result<Stmt>
[src]
fn prep_exec<A, T>(&mut self, query: A, params: T) -> Result<QueryResult> where
A: AsRef<str>,
T: Into<Params>,
[src]
A: AsRef<str>,
T: Into<Params>,
fn first_exec<Q, P, T>(&mut self, query: Q, params: P) -> Result<Option<T>> where
Q: AsRef<str>,
P: Into<Params>,
T: FromRow,
[src]
Q: AsRef<str>,
P: Into<Params>,
T: FromRow,
impl<'a> Drop for Transaction<'a>
[src]
impl<'a> Debug for Transaction<'a>
[src]
Auto Trait Implementations
impl<'a> Send for Transaction<'a>
impl<'a> Sync for Transaction<'a>
impl<'a> Unpin for Transaction<'a>
impl<'a> !UnwindSafe for Transaction<'a>
impl<'a> !RefUnwindSafe for Transaction<'a>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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<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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> Same<T> for T
type Output = T
Should always be Self