pub struct SavepointManager { /* private fields */ }Expand description
Savepoint manager for handling nested transactions
Implementations§
Source§impl SavepointManager
impl SavepointManager
pub fn new() -> Self
Sourcepub async fn create_savepoint(
&mut self,
tx: &mut Box<dyn DatabaseTransaction>,
) -> ModelResult<String>
pub async fn create_savepoint( &mut self, tx: &mut Box<dyn DatabaseTransaction>, ) -> ModelResult<String>
Create a new savepoint
Sourcepub async fn release_savepoint(
&mut self,
tx: &mut Box<dyn DatabaseTransaction>,
savepoint_name: &str,
) -> ModelResult<()>
pub async fn release_savepoint( &mut self, tx: &mut Box<dyn DatabaseTransaction>, savepoint_name: &str, ) -> ModelResult<()>
Release a savepoint
Sourcepub async fn rollback_to_savepoint(
&mut self,
tx: &mut Box<dyn DatabaseTransaction>,
savepoint_name: &str,
) -> ModelResult<()>
pub async fn rollback_to_savepoint( &mut self, tx: &mut Box<dyn DatabaseTransaction>, savepoint_name: &str, ) -> ModelResult<()>
Rollback to a savepoint
Sourcepub fn savepoint_count(&self) -> u32
pub fn savepoint_count(&self) -> u32
Get the current savepoint count
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SavepointManager
impl RefUnwindSafe for SavepointManager
impl Send for SavepointManager
impl Sync for SavepointManager
impl Unpin for SavepointManager
impl UnsafeUnpin for SavepointManager
impl UnwindSafe for SavepointManager
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more