Logical Query Operators逻辑查询运算符
Logical operators return data based on expressions that evaluate to true or false.逻辑运算符根据计算结果为true
或false
的表达式返回数据。
Note
For details on a specific operator, including syntax and examples, click on the link to the operator's reference page.有关特定运算符的详细信息,包括语法和示例,请单击该运算符参考页的链接。
$and | AND returns all documents that match the conditions of both clauses.AND 联接查询子句,返回与这两个子句的条件匹配的所有文档。 |
$not | |
$nor | NOR returns all documents that fail to match both clauses.NOR 联接查询子句将返回所有与这两个子句不匹配的文档。 |
$or | OR returns all documents that match the conditions of either clause. |