pub struct Transaction(/* private fields */);Implementations§
Source§impl Transaction
impl Transaction
pub fn testing() -> Transaction
Source§impl Transaction
impl Transaction
pub fn new( store: TransactionStore, single: TransactionSingleVersion, event_bus: EventBus, ) -> Transaction
Source§impl Transaction
impl Transaction
pub fn version(&self) -> Result<CommitVersion, Error>
pub fn begin_query(&self) -> Result<QueryTransaction, Error>
Source§impl Transaction
impl Transaction
pub fn begin_command(&self) -> Result<CommandTransaction, Error>
Source§impl Transaction
impl Transaction
pub fn get( &self, key: &EncodedKey, version: CommitVersion, ) -> Result<Option<Committed>, Error>
pub fn contains_key( &self, key: &EncodedKey, version: CommitVersion, ) -> Result<bool, Error>
pub fn range_batched( &self, range: EncodedKeyRange, version: CommitVersion, batch_size: u64, ) -> Result<<TransactionStore as MultiVersionRange>::RangeIter<'_>, Error>
pub fn range( &self, range: EncodedKeyRange, version: CommitVersion, ) -> Result<<TransactionStore as MultiVersionRange>::RangeIter<'_>, Error>
pub fn range_rev_batched( &self, range: EncodedKeyRange, version: CommitVersion, batch_size: u64, ) -> Result<<TransactionStore as MultiVersionRangeRev>::RangeIterRev<'_>, Error>
pub fn range_rev( &self, range: EncodedKeyRange, version: CommitVersion, ) -> Result<<TransactionStore as MultiVersionRangeRev>::RangeIterRev<'_>, Error>
Source§impl Transaction
impl Transaction
Sourcepub fn try_wait_for_watermark(
&self,
version: CommitVersion,
timeout: Duration,
) -> Result<(), AwaitWatermarkError>
pub fn try_wait_for_watermark( &self, version: CommitVersion, timeout: Duration, ) -> Result<(), AwaitWatermarkError>
Wait for the watermark to reach the specified version. Returns Ok(()) if the watermark reaches the version within the timeout, or Err(AwaitWatermarkError) if the timeout expires.
Sourcepub fn current_version(&self) -> Result<CommitVersion, Error>
pub fn current_version(&self) -> Result<CommitVersion, Error>
Get the current version from the transaction manager
Sourcepub fn done_until(&self) -> CommitVersion
pub fn done_until(&self) -> CommitVersion
Returns the highest version where ALL prior versions have completed. This is useful for CDC polling to know the safe upper bound for fetching CDC events - all events up to this version are guaranteed to be in storage.
Sourcepub fn watermarks(&self) -> (CommitVersion, CommitVersion)
pub fn watermarks(&self) -> (CommitVersion, CommitVersion)
Returns (query_done_until, command_done_until) for debugging watermark state.
Trait Implementations§
Source§impl Clone for Transaction
impl Clone for Transaction
Source§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Deref for Transaction
impl Deref for Transaction
Source§impl MultiVersionTransaction for Transaction
impl MultiVersionTransaction for Transaction
type Query = QueryTransaction
type Command = CommandTransaction
fn begin_query( &self, ) -> Result<<Transaction as MultiVersionTransaction>::Query, Error>
fn begin_command( &self, ) -> Result<<Transaction as MultiVersionTransaction>::Command, Error>
fn with_query<F, R>(&self, f: F) -> Result<R, Error>
fn with_command<F, R>(&self, f: F) -> Result<R, Error>
Source§impl WithEventBus for Transaction
impl WithEventBus for Transaction
Auto Trait Implementations§
impl Freeze for Transaction
impl !RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl !UnwindSafe for Transaction
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)