-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
aggregation-comparison.txt
80 lines (49 loc) · 1.57 KB
/
aggregation-comparison.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
================================
Comparison Aggregation Operators
================================
.. default-domain:: mongodb
.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: singlecol
.. include:: /includes/intro-aggregation-comparison.rst
.. include:: /includes/extracts/operators-toc-explanation.rst
.. list-table::
:widths: 30,70
:header-rows: 1
* - Name
- Description
* - :expression:`$cmp`
- Returns: ``0`` if the two values are
equivalent, ``1`` if the first value is greater than the
second, and ``-1`` if the first value is less than the
second.
* - :expression:`$eq`
- Returns ``true`` if the values are
equivalent.
* - :expression:`$gt`
- Returns ``true`` if the first value is
greater than the second.
* - :expression:`$gte`
- Returns ``true`` if the first value is
greater than or equal to the second.
* - :expression:`$lt`
- Returns ``true`` if the first value is less
than the second.
* - :expression:`$lte`
- Returns ``true`` if the first value is less
than or equal to the second.
* - :expression:`$ne`
- Returns ``true`` if the values are *not*
equivalent.
.. toctree::
:titlesonly:
:hidden:
/reference/operator/aggregation/cmp
/reference/operator/aggregation/eq
/reference/operator/aggregation/gt
/reference/operator/aggregation/gte
/reference/operator/aggregation/lt
/reference/operator/aggregation/lte
/reference/operator/aggregation/ne