pub struct Transaction<E> { /* private fields */ }Expand description
A transaction handle that provides query operations.
The transaction will be committed when dropped if no error occurred, or rolled back if an error occurred or panic happened.
Implementations§
Source§impl<E> Transaction<E>
impl<E> Transaction<E>
Sourcepub fn new(engine: E, config: TransactionConfig) -> Self
pub fn new(engine: E, config: TransactionConfig) -> Self
Create a new transaction handle.
Sourcepub fn config(&self) -> &TransactionConfig
pub fn config(&self) -> &TransactionConfig
Get the transaction configuration.
Sourcepub fn savepoint_name(&mut self) -> String
pub fn savepoint_name(&mut self) -> String
Create a savepoint.
Sourcepub fn mark_committed(&mut self)
pub fn mark_committed(&mut self)
Mark the transaction as committed.
Sourcepub fn is_committed(&self) -> bool
pub fn is_committed(&self) -> bool
Check if the transaction has been committed.
Auto Trait Implementations§
impl<E> Freeze for Transaction<E>where
E: Freeze,
impl<E> RefUnwindSafe for Transaction<E>where
E: RefUnwindSafe,
impl<E> Send for Transaction<E>where
E: Send,
impl<E> Sync for Transaction<E>where
E: Sync,
impl<E> Unpin for Transaction<E>where
E: Unpin,
impl<E> UnwindSafe for Transaction<E>where
E: UnwindSafe,
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