pub enum NodeExpression {
Show 15 variants
FocusNode,
Constant(NodeTerm),
Path(PropertyPath),
FilterShape {
nodes: Box<NodeExpression>,
shape: String,
},
Intersection(Vec<NodeExpression>),
Union(Vec<NodeExpression>),
Minus {
base: Box<NodeExpression>,
excluded: Box<NodeExpression>,
},
IfThenElse {
condition: Box<NodeExpression>,
then_expr: Box<NodeExpression>,
else_expr: Box<NodeExpression>,
},
FunctionCall {
function: String,
args: Vec<NodeExpression>,
},
Count(Box<NodeExpression>),
Distinct(Box<NodeExpression>),
OrderBy {
expr: Box<NodeExpression>,
sort_path: PropertyPath,
ascending: bool,
},
Limit {
expr: Box<NodeExpression>,
limit: usize,
},
Offset {
expr: Box<NodeExpression>,
offset: usize,
},
GroupConcat {
expr: Box<NodeExpression>,
separator: String,
},
}Expand description
A SHACL node expression that can be evaluated against a focus node and graph.
Variants§
FocusNode
The current focus node itself (sh:this).
Constant(NodeTerm)
A constant term.
Path(PropertyPath)
Follow a property path from the focus node.
FilterShape
Filter nodes through a shape.
Fields
nodes: Box<NodeExpression>The set of candidate nodes.
Intersection(Vec<NodeExpression>)
Intersection of multiple node sets.
Union(Vec<NodeExpression>)
Union of multiple node sets.
Minus
Set difference: nodes in base but not in excluded.
IfThenElse
Conditional: if condition evaluates to non-empty, use then_expr,
otherwise use else_expr.
Fields
condition: Box<NodeExpression>Condition expression.
then_expr: Box<NodeExpression>Expression when condition is true.
else_expr: Box<NodeExpression>Expression when condition is false.
FunctionCall
Apply a function to arguments.
Count(Box<NodeExpression>)
Count the number of nodes from the inner expression.
Distinct(Box<NodeExpression>)
Deduplicate results from the inner expression.
OrderBy
Sort results by a property path.
Fields
expr: Box<NodeExpression>Expression to sort.
sort_path: PropertyPathProperty path to sort by.
Limit
Limit the number of results.
Offset
Skip the first N results.
GroupConcat
Group-concat: join string values with a separator.
Fields
expr: Box<NodeExpression>Expression producing the values.
Trait Implementations§
Source§impl Clone for NodeExpression
impl Clone for NodeExpression
Source§impl Debug for NodeExpression
impl Debug for NodeExpression
Source§impl<'de> Deserialize<'de> for NodeExpression
impl<'de> Deserialize<'de> for NodeExpression
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for NodeExpression
impl PartialEq for NodeExpression
Source§impl Serialize for NodeExpression
impl Serialize for NodeExpression
impl StructuralPartialEq for NodeExpression
Auto Trait Implementations§
impl Freeze for NodeExpression
impl RefUnwindSafe for NodeExpression
impl Send for NodeExpression
impl Sync for NodeExpression
impl Unpin for NodeExpression
impl UnsafeUnpin for NodeExpression
impl UnwindSafe for NodeExpression
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.