Query Filtering

Query Parameters

Parameter Description
$where Condition(s) under which an entity should be returned in the result set.

 

$where Parameter

The $where parameter enables callers to filter results based on a custom expression or function that determines whether a particular item or record should be included in the query results

Constants

Constant Description
true Boolean true value.
false Boolean false value.
null NULL object reference.

Operators

In the below table, x and y denote expressions.

Logical Operators

Operator Description
! x
not x
Logical negation. x must be a Boolean type.
x = y
x == y
x eq y
x equal y
Equal.
x != y
x <> y
x ne y
x notequal y
Not Equal.
x < y
x lt y
x LessThan y
Less than.
x <= y
x le y
x LessThanEqual y
Less than or equal to.
x > y
x gt y
x GreaterThan y
Greater than.
x >= y
x ge y
x GreaterThanEqual y
Greater than or equal to.
x && y
x and y
x AndAlso y
Logical AND. x and y must be a Boolean type.
x || y
x or y
x OrElse y
Logical OR. x and y must be a Boolean type.

Other Operators

Operator Description
x ?? y null Coalescing. Evaluates to x if x is not null; otherwise, y.
np(x) null Propogating expression.
np(x, y) null Propogating expression with default value y.