01_user_documentation:07_rgg_xl:02_xl:03_query:01_predicate:01_node:03_expression
Expression
Expression patterns provide a way to fix the value which has to be bound to the pattern. The expression can either:
- return a single Node
- be a Node generator
The most common expression pattern is the root operator ^, which return the root of the current data graph.
Examples
module Organ(int age); // generator that return Organ Node that have an age < than the argument Node* getYoungOrgan(int ageThreshold){ yield (*o:Organ, (o[age] < ageThreshold) *) ; } // get a signle Node/ It could depends on arguments as well Node getOldestOrgan(){ return selectWhereMax( (*o:Organ*), o[age]); } public void run () [ o:getYoungOrgan(5) (>)* getOldestOrgan() ::> ; ]
01_user_documentation/07_rgg_xl/02_xl/03_query/01_predicate/01_node/03_expression.txt · Last modified: 2025/08/22 11:49 by gaetan
