pub enum BlankNodeMatchingMode {
Variable,
Filter,
}
Expand description
Specifies how blank nodes should be matched.
Blank nodes are scoped to a single graph. Users must choose whether a blank node in a pattern should only match blank nodes with the same label in the graph or match any node (like a variable).
In SPARQL queries, this strict matching is generally not desired because the blank nodes in the query are different from the blank nodes in the graph (even if they have the same label!). In this case, blank nodes in the query should be treated as variables and can therefore match any node in the graph.
However, if the goal is to retrieve all quads with a specific blank node as the subject, it may be appropriate to only match the blank node with that exact label in the graph.
Examples:
Mode | To Match | In Graph | Matches? |
---|---|---|---|
Variable | _:a | _:a | Yes |
Variable | _:a | _:b | Yes |
Filter | _:a | _:a | Yes |
Filter | _:a | _:b | No |
Variants§
Variable
Treat blank nodes as variables.
Filter
Treat blank nodes as a specific, constant filter (exact label match).
Trait Implementations§
Source§impl Clone for BlankNodeMatchingMode
impl Clone for BlankNodeMatchingMode
Source§fn clone(&self) -> BlankNodeMatchingMode
fn clone(&self) -> BlankNodeMatchingMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for BlankNodeMatchingMode
impl Debug for BlankNodeMatchingMode
Source§impl Default for BlankNodeMatchingMode
impl Default for BlankNodeMatchingMode
Source§fn default() -> BlankNodeMatchingMode
fn default() -> BlankNodeMatchingMode
Source§impl Hash for BlankNodeMatchingMode
impl Hash for BlankNodeMatchingMode
Source§impl PartialEq for BlankNodeMatchingMode
impl PartialEq for BlankNodeMatchingMode
impl Copy for BlankNodeMatchingMode
impl Eq for BlankNodeMatchingMode
impl StructuralPartialEq for BlankNodeMatchingMode
Auto Trait Implementations§
impl Freeze for BlankNodeMatchingMode
impl RefUnwindSafe for BlankNodeMatchingMode
impl Send for BlankNodeMatchingMode
impl Sync for BlankNodeMatchingMode
impl Unpin for BlankNodeMatchingMode
impl UnwindSafe for BlankNodeMatchingMode
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> 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
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> 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