Skip to main content

ReadTxn

Struct ReadTxn 

Source
pub struct ReadTxn<'a> { /* private fields */ }
Expand description

Concurrent read view pinned at a revision ceiling.

Implementations§

Source§

impl<'a> ReadTxn<'a>

Source

pub fn new(db: &'a InfiniteDb) -> Self

Pin reads at the current database revision on main.

Source

pub fn on_branch(self, branch: BranchId) -> Self

Read through a branch overlay instead of main.

Source

pub fn as_of(self, rev: RevisionId) -> Self

Override the revision ceiling for this read view.

Source

pub fn query(&self, space: SpaceId) -> Result<Vec<Record>>

Query all live records in space within this read view.

Source

pub fn query_bbox( &self, space: SpaceId, min: DimensionVector, max: DimensionVector, ) -> Result<Vec<Record>>

Bounding-box query within this read view.

Source

pub fn execute(&self, q: &Query) -> Result<Vec<Record>>

Execute a Query descriptor against this read view.

When q.range is set, an exact per-record coordinate filter is applied so results match InfiniteDb::query_bbox.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for ReadTxn<'a>

§

impl<'a> !UnwindSafe for ReadTxn<'a>

§

impl<'a> Freeze for ReadTxn<'a>

§

impl<'a> Send for ReadTxn<'a>

§

impl<'a> Sync for ReadTxn<'a>

§

impl<'a> Unpin for ReadTxn<'a>

§

impl<'a> UnsafeUnpin for ReadTxn<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.