/
query-logical.txt
50 lines (32 loc) · 1.12 KB
/
query-logical.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
=======================
Logical Query Operators
=======================
Logical operators return data based on expressions that evaluate to
true or false.
.. default-domain:: mongodb
.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: singlecol
.. include:: /includes/extracts/operators-toc-explanation.rst
.. list-table::
:widths: 30,70
:header-rows: 1
* - Name
- Description
* - :query:`$and`
- Joins query clauses with a logical ``AND`` returns all documents that match the conditions of both clauses.
* - :query:`$not`
- Inverts the effect of a query expression and returns documents that do *not* match the query expression.
* - :query:`$nor`
- Joins query clauses with a logical ``NOR`` returns all documents that fail to match both clauses.
* - :query:`$or`
- Joins query clauses with a logical ``OR`` returns all documents that match the conditions of either clause.
.. toctree::
:titlesonly:
:hidden:
/reference/operator/query/and
/reference/operator/query/not
/reference/operator/query/nor
/reference/operator/query/or