pub struct SharedReadTx { /* private fields */ }Expand description
Snapshot-pinned read handle for SharedDatabase.
Phase 41 (tranche 1): the handle keeps a stable snapshot_hlc and offers
read helpers. Reads currently reuse the existing engine path.
Implementations§
Sourcepub fn snapshot_hlc(&self) -> Hlc
pub fn snapshot_hlc(&self) -> Hlc
HLC snapshot associated with this read transaction.
Sourcepub fn get(&self, collection: &str, key: &Uuid) -> Result<Option<Value>>
pub fn get(&self, collection: &str, key: &Uuid) -> Result<Option<Value>>
Reads one document at this transaction snapshot.
Sourcepub fn scan(
&self,
collection: &str,
range: impl RangeBounds<Uuid>,
) -> Result<Vec<(Uuid, Value)>>
pub fn scan( &self, collection: &str, range: impl RangeBounds<Uuid>, ) -> Result<Vec<(Uuid, Value)>>
Scans a range at this transaction snapshot.
Trait Implementations§
Auto Trait Implementations§
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