User Tools

Site Tools


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

This is an old revision of the document!


Node pattern

T within a query is a pattern which matches instances of X. A query variable is declared implicitly, the built-in pattern matching algorithm of the XL run- time system then tries to bind nodes of the current graph to such a variable in order to match the associated patterns

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.1755779278.txt.gz · Last modified: 2025/08/21 14:27 by gaetan