Query Expressions¶
Description¶
We provide a system for filtering state queries via expressions similar to those used by mongoDB.
Data Structures¶
Operators¶
Boolean Operators¶
$and¶
{ $and: [ <expression1>, <expression2>, ... ] }
Description¶
Returns true
if all arguments evaluate to true
.
Parameters¶
expressions
-Expression[]
: Any number ofExpression
objects.
Returns¶
boolean
: true
if all arguments resolve to true
, false
otherwise.
$not¶
{ $not: [ <expression> ] }
Description¶
Returns the boolean opposite of the result of the argument expression.
Parameters¶
expression
:Expression
: A singleExpression
object.
Returns¶
boolean
: true
if the expression resolves to false
, false
otherwise.
Comparison Operators¶
$eq¶
{ $eq: [ <argument1>, <argument2>, ... ] }
Description¶
Checks if all arguments are equal.
Parameters¶
arguments
-any[]
: List of input values.
Returns¶
boolean
: true
if all arguments are equal, false
otherwise.
$gt¶
{ $gt: [ <argument1>, <argument2> ] }
Description¶
Checks if the first argument is greater than the second.
Parameters¶
argument1
-any
: First input value.argument2
-any
: Second input value.
Returns¶
boolean
: true
if the first argument is greater than the second, false
otherwise.
$gte¶
{ $gte: [ <argument1>, <argument2> ] }
Description¶
Checks if the first value is greater than or equal to the second.
Parameters¶
argument1
-any
: First input value.argument2
-any
: Second input value.
Returns¶
boolean
: true
if the first value is greater than or equal to the second, false
otherwise.
$lt¶
{ $lt: [ <argument1>, <argument2> ] }
Description¶
Checks if the first value is less than the second.
Parameters¶
argument1
-any
: First input value.argument2
-any
: Second input value.
Returns¶
boolean
: true
if the first value is less than the second, false
otherwise.
$lte¶
{ $lte: [ <argument1>, <argument2> ] }
Description¶
Checks if the first value is less than or equal to the second.
Parameters¶
argument1
-any
: First input value.argument2
-any
: Second input value.
Returns¶
boolean
: true
if the first value is less than or equal to the second, false
otherwise.