The which select statement allows you to query the database behind a model in natural language based syntax.
A typical which select statement looks like the below:
Structure of a Which Select Statement
A which select statement is preceded with the WHICH keyword, followed by a Model Element Name, followed by a set of Which Clauses.
The details are verbose, but the syntax is very easy if you just think your query in natural language. The sections in this documentation provide examples of the various Which Clauses that you can use.
WHICHSELECTSTMT -> KEYWDWHICH MODELELEMENT (WHICHCLAUSE)* EOF;
WHICHCLAUSE -> (KEYWDAND | KEYWDWHICH)? (WITHCLAUSE | WHICHTHATCLAUSE? (KEYWDWHICH | KEYWDTHAT | KEYWDAN | KEYWDA)? NODE MATHCLAUSE?)?;
WITHCLAUSE -> KEYWDWITH (KEYWDWHAT | KEYWDA)? (MODELELEMENT | NODEPROPERTYIDENTIFICATION);
WHICHTHATCLAUSE -> ((KEYWDIS PREDICATE | PREDICATECLAUSE) | KEYWDTHAT (PREDICATECLAUSE | MODELELEMENT ((KEYWDISNOT | KEYWDIS) | PREDICATECLAUSE)) | MODELELEMENT
MODELELEMENT -> PREBOUNDREADINGTEXT? MODELELEMENTNAME POSTBOUNDREADINGTEXT? MODELELEMENTSUFFIX?;
NODEPROPERTYIDENTIFICATION -> BROPEN MODELELEMENTNAME MODELELEMENTSUFFIX? QUOTEDIDENTIFIERLIST* BRCLOSE;