Building Conditions
Conditions are JSON like objects which process and return a boolean output at the runtime. An expressions object looks like -
Syntax
The condition can be build in 2 types -
Simple Condition
This condition has at most one condition comparison key.
Properties
<key>
The key which needs to be compared with the value. This can also be a Magical Autocomplete.
true
<operator>
true
<value>
The value to compare the <key>
with.
This can also be a Magical Autocomplete.
Compound Condition
This condition can compound together multiple Simple and Compound Conditions together.
Properties
<compound_operator>
true
<cond>
A nested Simple Condition object or Compound Condition object.
true
Examples
Simple Conditions
The above expression will return true if the variable name
contains the value Shrey else will return false.
Compound Conditions
The below snippet shows how you can build the query -
Multiple Level of Conditions
The below snippet shows how you can build the query -
List of Compound Operators available in CQL -
List of Conditional Operators available in CQL -
Last updated