Skip to main content

RowMatcher

Struct RowMatcher 

Source
pub struct RowMatcher { /* private fields */ }
Expand description

Compiled per-scan row matcher replacing per-row key decoding.

One matcher per iterator walk (one per tight prefix on multi-seek scans). matches_row runs the exact pipeline of the retired visible_matching_put + pattern.matches + graph filter + dedup:

  1. commit_ts from the fixed trailer; the logical key is the term prefix.
  2. MVCC collapse via SnapshotScanState::consider_slice (reusable buffer) — before any term work.
  3. op == Put from the fixed 5-byte value.
  4. Width-table slot walk, then residual bound-slot checks, graph membership, dedup cursor and whole-triple collapse — all on raw bytes.

Implementations§

Source§

impl RowMatcher

Source

pub fn compile( pattern: &EncodedTriplePattern, permutation: IndexPermutation, g_filter: GByteFilter, merge_default_graph: bool, start_after: Option<&EncodedQuad>, iri_only: IriOnlyMask, ) -> Self

Compile the matcher for one scan.

start_after is the exclusive resume cursor; its whole-triple skip is byte-level (KeyRow::triple_prefix) because a merged-default cursor (G rewritten to DefaultGraph) cannot be compared as a raw key.

Source

pub fn matches_row( &mut self, key: &[u8], value: &[u8], snapshot: SnapshotId, state: &mut SnapshotScanState, ) -> Result<MatchDecision, StorageError>

Match one versioned row (key ‖ trailer, 5-byte value) under snapshot.

See the struct docs for the per-row pipeline. On MatchDecision::Emit the walked slot starts are returned so the caller can build a KeyRow without re-walking the key.

Auto Trait Implementations§

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> Same for T

Source§

type Output = T

Should always be Self
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,