pub struct EncodedTriplePattern {
pub subject: Option<EncodedTerm>,
pub predicate: Option<EncodedTerm>,
pub object: Option<EncodedTerm>,
pub graph_name: Option<EncodedTerm>,
}Expand description
Ground or partially-bound encoded triple/quad pattern.
Fields§
§subject: Option<EncodedTerm>Bound subject (None = variable).
predicate: Option<EncodedTerm>Bound predicate (None = variable).
object: Option<EncodedTerm>Bound object (None = variable).
graph_name: Option<EncodedTerm>Bound graph name (None = variable; default graph is Some(DefaultGraph)).
Implementations§
Source§impl EncodedTriplePattern
impl EncodedTriplePattern
Sourcepub fn matches(&self, quad: &EncodedQuad) -> bool
pub fn matches(&self, quad: &EncodedQuad) -> bool
Whether quad satisfies all bound slots in this pattern.
Sourcepub fn best_permutation(&self, axis: PartitionAxis) -> IndexPermutation
pub fn best_permutation(&self, axis: PartitionAxis) -> IndexPermutation
Choose the axis-local permutation for scanning this pattern.
On the O axis, rdf:type patterns with a bound class use IndexPermutation::Tsg;
all other O patterns use IndexPermutation::Opsg. S/P axes pick the longest
bound prefix among the two general indexes.
Sourcepub fn prefix_bound_len(&self, permutation: IndexPermutation) -> usize
pub fn prefix_bound_len(&self, permutation: IndexPermutation) -> usize
Number of leading bound slots in permutation order.
Sourcepub fn build_scan_prefix_bytes(&self, permutation: IndexPermutation) -> Vec<u8> ⓘ
pub fn build_scan_prefix_bytes(&self, permutation: IndexPermutation) -> Vec<u8> ⓘ
Build a RocksDB prefix for permutation, encoding consecutive bound slots until the first None.
Sourcepub fn bind_slot(&mut self, slot: QuadSlot, term: EncodedTerm)
pub fn bind_slot(&mut self, slot: QuadSlot, term: EncodedTerm)
Bind term into slot (broadcast allow-list / prefix specialization).
Sourcepub fn prepare_tight_allow_list(
&self,
permutation: IndexPermutation,
slot: QuadSlot,
terms: &[EncodedTerm],
) -> Option<SortedTightAllowList>
pub fn prepare_tight_allow_list( &self, permutation: IndexPermutation, slot: QuadSlot, terms: &[EncodedTerm], ) -> Option<SortedTightAllowList>
Sort+dedup allow-list terms by encoded tight prefix, or None when binding
slot does not extend a contiguous permutation prefix.
Shared prefix is this pattern with slot unbound. Each term’s tight
prefix must start with that shared prefix and be strictly longer, so a
single iterator over the shared range can Seek to each term.
Trait Implementations§
Source§impl Clone for EncodedTriplePattern
impl Clone for EncodedTriplePattern
Source§fn clone(&self) -> EncodedTriplePattern
fn clone(&self) -> EncodedTriplePattern
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more