pub struct SavepointManager { /* private fields */ }Expand description
Savepoint manager for all transactions
Implementations§
Source§impl SavepointManager
impl SavepointManager
Sourcepub fn create_savepoint(
&self,
txn_id: TxnId,
name: String,
lsn: Lsn,
lock_count: usize,
write_set_index: usize,
) -> Result<Savepoint, SavepointError>
pub fn create_savepoint( &self, txn_id: TxnId, name: String, lsn: Lsn, lock_count: usize, write_set_index: usize, ) -> Result<Savepoint, SavepointError>
Create a savepoint for a transaction
Sourcepub fn release_savepoint(
&self,
txn_id: TxnId,
name: &str,
) -> Result<Savepoint, SavepointError>
pub fn release_savepoint( &self, txn_id: TxnId, name: &str, ) -> Result<Savepoint, SavepointError>
Release a savepoint
Sourcepub fn rollback_to_savepoint(
&self,
txn_id: TxnId,
name: &str,
) -> Result<(Savepoint, Vec<String>), SavepointError>
pub fn rollback_to_savepoint( &self, txn_id: TxnId, name: &str, ) -> Result<(Savepoint, Vec<String>), SavepointError>
Rollback to a savepoint
Sourcepub fn savepoint_exists(&self, txn_id: TxnId, name: &str) -> bool
pub fn savepoint_exists(&self, txn_id: TxnId, name: &str) -> bool
Check if savepoint exists
Sourcepub fn savepoint_depth(&self, txn_id: TxnId) -> usize
pub fn savepoint_depth(&self, txn_id: TxnId) -> usize
Get savepoint depth for transaction
Sourcepub fn get_savepoint_names(&self, txn_id: TxnId) -> Vec<String>
pub fn get_savepoint_names(&self, txn_id: TxnId) -> Vec<String>
Get all savepoint names for transaction
Sourcepub fn cleanup_transaction(&self, txn_id: TxnId)
pub fn cleanup_transaction(&self, txn_id: TxnId)
Clean up savepoints for a transaction
Sourcepub fn stats(&self) -> SavepointStats
pub fn stats(&self) -> SavepointStats
Get statistics
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
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request