User Tools

Site Tools


01_user_documentation:07_rgg_xl:02_xl:03_query:01_predicate:01_node

Node pattern

Node predicates represent patterns applied on the Nodes in the graph. They are the base of XL queries, as it is required to have at least one node predicate in a query.

Type

Query nodes from their type. E.g. the predicate Sphere within a query is a pattern that matches instances of Sphere.

Parametrized

Parametrized pattern enables to bound query variables to parameters of the node pattern. E.g. Sphere(5) Sphere(r) both 5 and r are declared query variables, yet they are used differently:

  • Sphere(5) matches Sphere where the value of the parameter is exactly 5.
  • Sphere(r) matches all Spheres and bound the parameter to the query variable r, making it available to use.

→ Read more...

Expression

Expression patterns provide a way to fix the value which has to be bound to the pattern. The expression can either:

The most common expression pattern is the root operator ^, which return the root of the current data graph.

→ Read more...

Unary

An unary predicate enables the use of boolean methods as patterns. The methods needs to:

  • return a boolean
  • have at least one argument, and its first argument is of type Node (or extend Node)

→ Read more...

Wrapper

Wrapper nodes can be included in query. When used as predicate, the wrapper node can either be used to fetch the wrapped value, or the wrapper node.

→ Read more...

Array

The XL query syntax uses the square brackets ([ and ]) as symbol for sub trees in the path pattern. Thus, there is a conflict between the syntax for element access in an array, and sub-tree predicate.

→ Read more...

01_user_documentation/07_rgg_xl/02_xl/03_query/01_predicate/01_node.txt · Last modified: 2025/08/22 12:48 by gaetan