[−][src]Struct sqlx_core::transaction::Transaction
An in-progress database transaction or savepoint.
A transaction starts with a call to Pool::begin or Connection::begin.
A transaction should end with a call to commit or rollback. If neither are called
before the transaction goes out-of-scope, rollback is called. In other
words, rollback is called on drop if the transaction is still in-progress.
A savepoint is a special mark inside a transaction that allows all commands that are executed after it was established to be rolled back, restoring the transaction state to what it was at the time of the savepoint.
Implementations
impl<'c, DB> Transaction<'c, DB> where
DB: Database, [src]
DB: Database,
pub async fn commit(__arg0: Self) -> Result<(), Error>[src]
Commits this transaction or savepoint.
pub async fn rollback(__arg0: Self) -> Result<(), Error>[src]
Aborts this transaction or savepoint.
Trait Implementations
impl<'c, DB> Debug for Transaction<'c, DB> where
DB: Database, [src]
DB: Database,
impl<'c, DB> Deref for Transaction<'c, DB> where
DB: Database, [src]
DB: Database,
type Target = DB::Connection
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target[src]
impl<'c, DB> DerefMut for Transaction<'c, DB> where
DB: Database, [src]
DB: Database,
impl<'c, DB> Drop for Transaction<'c, DB> where
DB: Database, [src]
DB: Database,
Auto Trait Implementations
impl<'c, DB> !RefUnwindSafe for Transaction<'c, DB>
impl<'c, DB> Send for Transaction<'c, DB> where
<DB as Database>::Connection: Send,
<<DB as Database>::Connection as Connection>::Options: Send + Sync,
<DB as Database>::Connection: Send,
<<DB as Database>::Connection as Connection>::Options: Send + Sync,
impl<'c, DB> Sync for Transaction<'c, DB> where
<DB as Database>::Connection: Send + Sync,
<<DB as Database>::Connection as Connection>::Options: Send + Sync,
<DB as Database>::Connection: Send + Sync,
<<DB as Database>::Connection as Connection>::Options: Send + Sync,
impl<'c, DB> Unpin for Transaction<'c, DB> where
<DB as Database>::Connection: Unpin,
<DB as Database>::Connection: Unpin,
impl<'c, DB> !UnwindSafe for Transaction<'c, DB>
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>,