Where Clause

The optional where clause is analogous to a rule’s conditions. The expression in the where clause can be simple or complex.

In the where clause you can use following:

  • Literal values
  • Catalog functions and rule functions
  • Entities that are declared in the from clause

Examples

Pound or hash (#) is the escape character. See Keywords and Other Reserved Words.

where A.customerId = B.customerId
where A.id = B@extid                    // Entity attributes
and ( B@parent.name = 'ABCD' or C.name = "EFGH" )
and  A.tokens[5]  = 50                  // array property
and  ( A.containedConceptE.price > 100
or B.startTime > /#DateTime/addMinute(/#DateTime/now(),5) )
and B.value between 2 and 5
Tip: The pound sign (#) is used to escape reserved (key) words. See Keywords and Other Reserved Words for a complete listing.