pub struct TransactionManager;Expand description
Manages persisted KV transactions for CLI usage.
Implementations§
Source§impl TransactionManager
impl TransactionManager
Sourcepub fn validate_read_at(db: &Database, point: &ReadAtPoint) -> ReadAtResult<()>
pub fn validate_read_at(db: &Database, point: &ReadAtPoint) -> ReadAtResult<()>
Checks the selected backend’s read-at eligibility before a remote worker attempts to open a fenced SQL session. This is distinct from persisted CLI transaction metadata and never uses its wall-clock start time.
Sourcepub fn read_at_capability(db: &Database) -> ReadAtCapability
pub fn read_at_capability(db: &Database) -> ReadAtCapability
Returns the selected backend’s explicit read-at capability.
Sourcepub fn begin_with_timeout(db: &Database, timeout: Duration) -> Result<String>
pub fn begin_with_timeout(db: &Database, timeout: Duration) -> Result<String>
Begins a new transaction with the given timeout and returns its ID.
Sourcepub fn get_info(db: &Database, txn_id: &str) -> Result<TransactionInfo>
pub fn get_info(db: &Database, txn_id: &str) -> Result<TransactionInfo>
Retrieves persisted transaction metadata.
Sourcepub fn is_expired(db: &Database, txn_id: &str) -> Result<bool>
pub fn is_expired(db: &Database, txn_id: &str) -> Result<bool>
Checks whether a transaction has expired.
Sourcepub fn get(db: &Database, txn_id: &str, key: &[u8]) -> Result<Option<Vec<u8>>>
pub fn get(db: &Database, txn_id: &str, key: &[u8]) -> Result<Option<Vec<u8>>>
Retrieves a key within the specified transaction.
Sourcepub fn put(db: &Database, txn_id: &str, key: &[u8], value: &[u8]) -> Result<()>
pub fn put(db: &Database, txn_id: &str, key: &[u8], value: &[u8]) -> Result<()>
Stages a put operation within the specified transaction.
Sourcepub fn delete(db: &Database, txn_id: &str, key: &[u8]) -> Result<()>
pub fn delete(db: &Database, txn_id: &str, key: &[u8]) -> Result<()>
Stages a delete operation within the specified transaction.
Auto Trait Implementations§
impl Freeze for TransactionManager
impl RefUnwindSafe for TransactionManager
impl Send for TransactionManager
impl Sync for TransactionManager
impl Unpin for TransactionManager
impl UnsafeUnpin for TransactionManager
impl UnwindSafe for TransactionManager
Blanket Implementations§
impl<T> Allocation for T
impl<T> Allocation for T
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