pub struct Transaction<'a> { /* private fields */ }Expand description
A transaction on a Connection connection.
Dropping a transaction before commit or rollback follows the behavior of the selected driver.
While the transaction is alive, it keeps the Connection borrowed.
Implementations§
Trait Implementations§
Source§impl Drop for Transaction<'_>
impl Drop for Transaction<'_>
Source§impl Executor for &mut Transaction<'_>
impl Executor for &mut Transaction<'_>
Source§type Statement<'a> = Statement<'a>
where
Self: 'a
type Statement<'a> = Statement<'a> where Self: 'a
Prepared statement returned by this executor.
Source§async fn query(&mut self, sql: &str) -> Result<Self::Rows<'_>>
async fn query(&mut self, sql: &str) -> Result<Self::Rows<'_>>
Runs SQL without explicit bound parameters. Read more
Source§async fn query_prepared_source<P>(
&mut self,
sql: &str,
params: &P,
) -> Result<Self::Rows<'_>>where
P: ParamSource + ?Sized,
async fn query_prepared_source<P>(
&mut self,
sql: &str,
params: &P,
) -> Result<Self::Rows<'_>>where
P: ParamSource + ?Sized,
Runs SQL with a borrowed parameter source. Read more
Source§impl Executor for Transaction<'_>
impl Executor for Transaction<'_>
Source§type Statement<'a> = Statement<'a>
where
Self: 'a
type Statement<'a> = Statement<'a> where Self: 'a
Prepared statement returned by this executor.
Source§async fn query(&mut self, sql: &str) -> Result<Self::Rows<'_>>
async fn query(&mut self, sql: &str) -> Result<Self::Rows<'_>>
Runs SQL without explicit bound parameters. Read more
Source§async fn query_prepared_source<P>(
&mut self,
sql: &str,
params: &P,
) -> Result<Self::Rows<'_>>where
P: ParamSource + ?Sized,
async fn query_prepared_source<P>(
&mut self,
sql: &str,
params: &P,
) -> Result<Self::Rows<'_>>where
P: ParamSource + ?Sized,
Runs SQL with a borrowed parameter source. Read more
Auto Trait Implementations§
impl<'a> Freeze for Transaction<'a>
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> UnsafeUnpin for Transaction<'a>
impl<'a> UnwindSafe for Transaction<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more