pub enum UnifiedTermPattern {
NamedNode(NamedNode),
BlankNode(BlankNode),
Literal(Literal),
Variable(Variable),
Wildcard,
}
Expand description
Unified term pattern that works with both systems
Variants§
NamedNode(NamedNode)
Named node (IRI)
BlankNode(BlankNode)
Blank node
Literal(Literal)
Literal value
Variable(Variable)
Variable
Wildcard
Wildcard (matches anything)
Implementations§
Source§impl UnifiedTermPattern
impl UnifiedTermPattern
Sourcepub fn to_algebra_term_pattern(&self) -> Result<AlgebraTermPattern, OxirsError>
pub fn to_algebra_term_pattern(&self) -> Result<AlgebraTermPattern, OxirsError>
Convert to algebra TermPattern
Sourcepub fn to_model_subject_pattern(&self) -> Option<SubjectPattern>
pub fn to_model_subject_pattern(&self) -> Option<SubjectPattern>
Convert to model SubjectPattern
Sourcepub fn to_model_predicate_pattern(&self) -> Option<PredicatePattern>
pub fn to_model_predicate_pattern(&self) -> Option<PredicatePattern>
Convert to model PredicatePattern
Sourcepub fn to_model_object_pattern(&self) -> Option<ObjectPattern>
pub fn to_model_object_pattern(&self) -> Option<ObjectPattern>
Convert to model ObjectPattern
Sourcepub fn from_algebra_term(term: &AlgebraTermPattern) -> Self
pub fn from_algebra_term(term: &AlgebraTermPattern) -> Self
Create from algebra TermPattern
Sourcepub fn from_model_subject(subject: &SubjectPattern) -> Self
pub fn from_model_subject(subject: &SubjectPattern) -> Self
Create from model SubjectPattern
Sourcepub fn from_model_predicate(predicate: &PredicatePattern) -> Self
pub fn from_model_predicate(predicate: &PredicatePattern) -> Self
Create from model PredicatePattern
Sourcepub fn from_model_object(object: &ObjectPattern) -> Self
pub fn from_model_object(object: &ObjectPattern) -> Self
Create from model ObjectPattern
Sourcepub fn matches_subject(&self, subject: &Subject) -> bool
pub fn matches_subject(&self, subject: &Subject) -> bool
Check if this pattern matches a subject
Sourcepub fn matches_predicate(&self, predicate: &Predicate) -> bool
pub fn matches_predicate(&self, predicate: &Predicate) -> bool
Check if this pattern matches a predicate
Sourcepub fn matches_object(&self, object: &Object) -> bool
pub fn matches_object(&self, object: &Object) -> bool
Check if this pattern matches an object
Sourcepub fn selectivity_factor(&self) -> f64
pub fn selectivity_factor(&self) -> f64
Get selectivity factor for cost estimation
Trait Implementations§
Source§impl Clone for UnifiedTermPattern
impl Clone for UnifiedTermPattern
Source§fn clone(&self) -> UnifiedTermPattern
fn clone(&self) -> UnifiedTermPattern
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for UnifiedTermPattern
impl Debug for UnifiedTermPattern
Source§impl Hash for UnifiedTermPattern
impl Hash for UnifiedTermPattern
Source§impl PartialEq for UnifiedTermPattern
impl PartialEq for UnifiedTermPattern
impl Eq for UnifiedTermPattern
impl StructuralPartialEq for UnifiedTermPattern
Auto Trait Implementations§
impl Freeze for UnifiedTermPattern
impl RefUnwindSafe for UnifiedTermPattern
impl Send for UnifiedTermPattern
impl Sync for UnifiedTermPattern
impl Unpin for UnifiedTermPattern
impl UnwindSafe for UnifiedTermPattern
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
Converts
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>
Converts
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