Skip to main content

ScanPatternRequest

Struct ScanPatternRequest 

Source
pub struct ScanPatternRequest {
Show 15 fields pub pattern: Option<EncodedTriplePattern>, pub snapshot_id: u64, pub limit: u64, pub permutation: i32, pub filter_slot: i32, pub filter_terms: Vec<Vec<u8>>, pub start_after: Option<EncodedQuad>, pub graph_filter_terms: Vec<Vec<u8>>, pub graph_filter_allow: bool, pub merge_default_graph: bool, pub iri_only_subject: bool, pub iri_only_object: bool, pub omitted_slots: u32, pub verdict_wanted: bool, pub comparisons: Vec<SlotComparison>,
}

Fields§

§pattern: Option<EncodedTriplePattern>§snapshot_id: u64

MVCC read timestamp. Phase 8 sources this from the cluster TSO.

§limit: u64

0 means unlimited.

§permutation: i32

UNSPECIFIED lets the partition pick its longest-prefix axis-local index.

§filter_slot: i32

Phase 9b broadcast: when set with filter_terms, only rows whose term in this slot is a member of filter_terms are returned. The pattern slot should be unbound; the partition binds each filter term and scans.

§filter_terms: Vec<Vec<u8>>

Encoded term bytes (same encoding as EncodedTriplePattern slots).

§start_after: Option<EncodedQuad>

Exclusive resume cursor: skip this logical quad and every LSM version of it, then continue in index order. Unset means start of the prefix.

§graph_filter_terms: Vec<Vec<u8>>

Residual G-slot membership. Always the graph name; never a PatternSlot. false (default) = block-list; true = allow-list. Empty block-list blocks nothing (no extra G constraint; pattern.graph_name still applies). Empty allow-list allows nothing.

§graph_filter_allow: bool§merge_default_graph: bool

SPARQL default-graph RDF merge: emit each distinct S/P/O once (G last in every hexastore index, so same-triple named graphs are adjacent), skip start_after’s whole triple (any G), and rewrite each result G slot to DefaultGraph (zero bytes) before the response. Compute never projects G for those scans. false = ordinary quad scan (GRAPH / single-graph BGP).

§iri_only_subject: bool

IRI-only pushdown (planner-derived from FILTER(isIRI(?x)) conjuncts): a set flag rejects every row whose S (11) / O (12) segment is not a NamedNode encoding (first byte TYPE_NAMED_NODE_ID). The predicate slot is never flagged: only a NamedNode can begin a predicate segment. The SPARQL filter stays in the plan and remains the source of truth — this is a cheap partition-side pre-filter, not a semantic replacement. CountPattern must not set these (its helpers do not evaluate them; a set flag is rejected with invalid_argument).

§iri_only_object: bool§omitted_slots: u32

Slots whose term bytes the partition OMITS from every returned quad. Bit 0 subject, bit 1 predicate, bit 2 object, bit 3 graph; 0 (the default) sends every slot, and bits above 3 are rejected with invalid_argument.

An omitted slot is an empty bytes field, which on the wire is identical to the default graph’s zero-length encoding, so the receiver MUST NOT decode one: it reassembles the slot from this request’s own bound pattern term, or from its counted-presence sentinel when no consumer reads the slot. Compute omits a slot only when one of those two answers is exact.

Cursors are never omitted: start_after carries all four slots, because compute builds the next cursor (and the eager stream re-opens from its last appended row) out of returned quads, and a reassembled slot would encode the wrong key. CountPattern rejects a non-zero mask (it returns no quads).

§verdict_wanted: bool

Whether the consumer will issue another request after a FULL page, and therefore wants the walk to spend look-ahead work reporting an honest terminal verdict at exact limit boundaries. false (the default) stops the walk AT the limit’th row — the historical behavior, and the honest answer for a consumer whose demand equals its whole remaining interest (an ASK / one-shot slice: a satisfied page is never followed by another request). true keeps the walk running past a full page until the next emitting row proves more data (LIMITED) or the key range ends (terminal verdict). Inert when limit = 0 (a drain never fills its page).

§comparisons: Vec<SlotComparison>

Slot comparisons evaluated inside the walk before a row is emitted. ANDed in list order. A row the partition cannot decide is kept: this is a definite-drop mask, and the compute-side FILTER conjunct stays authoritative. ScanPattern and ScanPatternStream honor the field; CountPattern rejects it (its count walks count raw rows and never decode a slot term).

Implementations§

Source§

impl ScanPatternRequest

Source

pub fn permutation(&self) -> IndexPermutation

Returns the enum value of permutation, or the default if the field is set to an invalid enum value.

Source

pub fn set_permutation(&mut self, value: IndexPermutation)

Sets permutation to the provided enum value.

Source

pub fn filter_slot(&self) -> PatternSlot

Returns the enum value of filter_slot, or the default if the field is set to an invalid enum value.

Source

pub fn set_filter_slot(&mut self, value: PatternSlot)

Sets filter_slot to the provided enum value.

Trait Implementations§

Source§

impl Clone for ScanPatternRequest

Source§

fn clone(&self) -> ScanPatternRequest

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ScanPatternRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ScanPatternRequest

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Message for ScanPatternRequest

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8> ⓘ
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘ
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for ScanPatternRequest

Source§

fn eq(&self, other: &ScanPatternRequest) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for ScanPatternRequest

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

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,