IMQGrammar: Difference between revisions

From Endeavour Knowledge Base
(Created page with " ===Boolean operators=== The boolean operators 'and' , 'or' and 'not' can operate in either the from or where clause, using the "bool" predicate. 'and' is the same as an intersection (all must be true), or is a union (at least one true) and 'not' is a union (Any may be true). Further nesting can resolve boolean combinations (e.g. not/and)<div class="toccolours mw-collapsible mw-collapsed"> Example boolean operators. Select Expand to show: <div class="mw-collapsible-cont...")
 
m (DavidStables moved page IMQueryClauses to IMQGrammar)
(No difference)

Revision as of 16:06, 11 March 2023

Boolean operators

The boolean operators 'and' , 'or' and 'not' can operate in either the from or where clause, using the "bool" predicate. 'and' is the same as an intersection (all must be true), or is a union (at least one true) and 'not' is a union (Any may be true). Further nesting can resolve boolean combinations (e.g. not/and)

Example boolean operators. Select Expand to show:
{"where" : {
       "bool" : "and",
       "where" : [ { "id" : "age",
                     "operator" : ">=",
                     "value" : 18,
                     "unit" : "year"},
                    {"id" : "statedGender",
                     "in" : [ {"@id" : "im:905031000252103",
                               "name" : "Male (stated gender)" } ] } ] }