翻译或纠错本页面
- Reference >
- Operators >
- Aggregation Pipeline Operators >
- Boolean Aggregation Operators
Boolean Aggregation Operators¶
Boolean expressions evaluate their argument expressions as booleans and return a boolean as the result.
In addition to the false boolean value, Boolean expression evaluates as false the following: null, 0, and undefined values. The Boolean expression evaluates all other values as true, including non-zero numeric values and arrays.
注解
For details on specific operator, including syntax and examples, click on the specific operator to go to its reference page.
Name | Description |
---|---|
$and | Returns true only when all its expressions evaluate to true. Accepts any number of argument expressions. |
$or | Returns true when any of its expressions evaluates to true. Accepts any number of argument expressions. |
$not | Returns the boolean value that is the opposite of its argument expression. Accepts a single argument expression. |