pub struct Transaction { /* private fields */ }Expand description
Multi-record atomic transaction batch.
Implementations§
Source§impl Transaction
impl Transaction
Sourcepub fn put(
&mut self,
ns: &[u8],
key: &[u8],
val: &[u8],
lsn: Lsn,
timestamp: i64,
) -> Result<(), EdgestoreError>
pub fn put( &mut self, ns: &[u8], key: &[u8], val: &[u8], lsn: Lsn, timestamp: i64, ) -> Result<(), EdgestoreError>
Append a put operation to this transaction.
Sourcepub fn put_with_ttl(
&mut self,
ns: &[u8],
key: &[u8],
val: &[u8],
ttl_secs: u32,
lsn: Lsn,
timestamp: i64,
) -> Result<(), EdgestoreError>
pub fn put_with_ttl( &mut self, ns: &[u8], key: &[u8], val: &[u8], ttl_secs: u32, lsn: Lsn, timestamp: i64, ) -> Result<(), EdgestoreError>
Append a put-with-TTL operation to this transaction.
Sourcepub fn delete(
&mut self,
ns: &[u8],
key: &[u8],
lsn: Lsn,
timestamp: i64,
) -> Result<(), EdgestoreError>
pub fn delete( &mut self, ns: &[u8], key: &[u8], lsn: Lsn, timestamp: i64, ) -> Result<(), EdgestoreError>
Append a delete operation to this transaction.
Sourcepub fn rollback_self(&mut self)
pub fn rollback_self(&mut self)
Roll back this transaction, clearing all pending records.
Sourcepub fn take_pending(&mut self) -> Result<Vec<WalRecord>, EdgestoreError>
pub fn take_pending(&mut self) -> Result<Vec<WalRecord>, EdgestoreError>
Take ownership of pending records, marking this transaction committed.
Auto Trait Implementations§
impl Freeze for Transaction
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnsafeUnpin for Transaction
impl UnwindSafe for Transaction
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