pub struct TableReader { /* private fields */ }Expand description
A typed global snapshot read proxy.
Implementations§
Source§impl TableReader
impl TableReader
Sourcepub fn open(reader: Reader, name: impl Into<String>) -> Result<Self>
pub fn open(reader: Reader, name: impl Into<String>) -> Result<Self>
Open the snapshot carried by this core reader.
Readers opened from a core current-pointer reader check for later committed snapshots on its configured interval. Core fixed-snapshot readers remain fixed.
Sourcepub fn schema(&self) -> Arc<TableSchema> ⓘ
pub fn schema(&self) -> Arc<TableSchema> ⓘ
Return the schema of this reader’s currently loaded global snapshot.
This accessor never checks CURRENT. A later fallible read may refresh a current-pointer
reader; call Self::refresh before schema inspection when the latest committed snapshot
is required.
Sourcepub fn key_builder(&self) -> TableKeyBuilder
pub fn key_builder(&self) -> TableKeyBuilder
Start building one primary key in schema order.
Sourcepub fn project_by_names<S: AsRef<str>>(
&self,
field_names: &[S],
) -> Result<TableProjection>
pub fn project_by_names<S: AsRef<str>>( &self, field_names: &[S], ) -> Result<TableProjection>
Compile a reusable read projection from top-level field names.
Sourcepub fn multi_get(&self, keys: &[TableKey]) -> Result<Vec<Option<Vec<Value>>>>
pub fn multi_get(&self, keys: &[TableKey]) -> Result<Vec<Option<Vec<Value>>>>
Read many primary keys while preserving order and duplicates.
Sourcepub fn scan_bounds(
&self,
bucket: u16,
start_key_inclusive: Option<&TableKey>,
end_key_exclusive: Option<&TableKey>,
) -> Result<TableScan>
pub fn scan_bounds( &self, bucket: u16, start_key_inclusive: Option<&TableKey>, end_key_exclusive: Option<&TableKey>, ) -> Result<TableScan>
Scan one bucket from an inclusive primary-key bound to an exclusive bound.
Sourcepub fn scan_plan(&self) -> Result<TableScanPlan>
pub fn scan_plan(&self) -> Result<TableScanPlan>
Build a portable full-scan plan pinned to this reader’s current snapshot.
Sourcepub fn refresh(&self) -> Result<bool>
pub fn refresh(&self) -> Result<bool>
Refresh this current-pointer reader to the latest committed global snapshot.
Existing projections, scans, and scan plans retain their current fixed view. If the
current pointer is unchanged, this returns false; an error leaves this reader unchanged.
Fixed snapshot readers always return false.
Auto Trait Implementations§
impl !Freeze for TableReader
impl !RefUnwindSafe for TableReader
impl !UnwindSafe for TableReader
impl Send for TableReader
impl Sync for TableReader
impl Unpin for TableReader
impl UnsafeUnpin for TableReader
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more