pub struct RowIdIndex(/* private fields */);Expand description
An index of row ids
This index is used to map row ids to their corresponding addresses. These addresses correspond to physical positions in the dataset. See RowAddress.
This structure only contains rows that physically exist. However, it may map to addresses that have been tombstoned. A separate tombstone index is used to track tombstoned rows.
Implementations§
Source§impl RowIdIndex
impl RowIdIndex
Sourcepub fn new(fragment_indices: &[FragmentRowIdIndex]) -> Result<Self>
pub fn new(fragment_indices: &[FragmentRowIdIndex]) -> Result<Self>
Create a new index from a list of fragment ids and their corresponding row id sequences.
Sourcepub fn get(&self, row_id: u64) -> Option<RowAddress>
pub fn get(&self, row_id: u64) -> Option<RowAddress>
Get the address for a given row id.
Will return None if the row id does not exist in the index.
Sourcepub fn get_many(&self, row_ids: &[u64]) -> Vec<Option<RowAddress>>
pub fn get_many(&self, row_ids: &[u64]) -> Vec<Option<RowAddress>>
Get addresses for many row ids in one pass over the index.
Returns one entry per input id, in input order (None for missing).
Sorts a working copy of the input internally so the chunk iterator
is advanced at most once per chunk, amortizing the per-id tree walk
from O(N · log F) to O(F + N).
Trait Implementations§
Source§impl Debug for RowIdIndex
impl Debug for RowIdIndex
Source§impl DeepSizeOf for RowIdIndex
impl DeepSizeOf for RowIdIndex
Source§fn deep_size_of_children(&self, context: &mut Context) -> usize
fn deep_size_of_children(&self, context: &mut Context) -> usize
Source§fn deep_size_of(&self) -> usize
fn deep_size_of(&self) -> usize
Auto Trait Implementations§
impl Freeze for RowIdIndex
impl RefUnwindSafe for RowIdIndex
impl Send for RowIdIndex
impl Sync for RowIdIndex
impl Unpin for RowIdIndex
impl UnsafeUnpin for RowIdIndex
impl UnwindSafe for RowIdIndex
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
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