Building Conditions
Last updated
Last updated
Conditions are JSON like objects which process and return a boolean output at the runtime. An expressions object looks like -
The condition can be build in 2 types -
This condition has at most one condition comparison key.
<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.
This condition can compound together multiple Simple and Compound Conditions together.
<compound_operator>
true
<cond>
A nested Simple Condition object or Compound Condition object.
true
The above expression will return true if the variable name
contains the value Shrey else will return false.
The below snippet shows how you can build the query -
The below snippet shows how you can build the query -
List of Compound Operators available in CQL -
List of Conditional Operators available in CQL -
A CQL conditional operator which defines what type of comparison has to be done in this condition object. You can check the list of CQL conditions operators .
A CQL compound operator which defines what type of comparison has to be done between the list of nested conditions. You can check the list of CQL compound operators .