File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed
content/manual/upcoming/source/reference/operator/aggregation Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -62,12 +62,12 @@ collection to populate test data:
62
62
.. code-block:: javascript
63
63
64
64
db.getSiblingDB("examples").sensors.insertMany([
65
- { "_id" : 1, "reading" : NumberDecimal(26.0) },
65
+ { "_id" : 1, "reading" : NumberDecimal(" 26.0" ) },
66
66
{ "_id" : 2, "reading" : NumberLong(25.0) },
67
67
{ "_id" : 3, "reading" : NumberInt(24) },
68
68
{ "_id" : 4, "reading" : 24.0 },
69
69
{ "_id" : 5, "reading" : "24" },
70
- { "_id" : 6, "reading" : [ NumberDecimal(26 ) ]}
70
+ { "_id" : 6, "reading" : [ NumberDecimal("26" ) ]}
71
71
])
72
72
73
73
The following aggregation uses the :pipeline:`$addFields` aggregation
Original file line number Diff line number Diff line change 1
1
==================
2
2
$tan (aggregation)
3
3
==================
4
-
5
- .. meta::
6
- :description: Calculate the tangent of a value in radians using the `$tan` operator in MongoDB aggregation.
4
+
5
+ .. meta::
6
+ :description: Calculate the tangent of a value in radians using the `$tan` operator in MongoDB aggregation.
7
7
8
8
.. default-domain:: mongodb
9
9
@@ -131,7 +131,7 @@ Example
131
131
"_id" : ObjectId("5c50782193f833234ba90d85"),
132
132
"angle_a" : NumberDecimal("53.13010235415597870314438744090659"),
133
133
"side_a" : NumberDecimal("3")
134
- "side_b" : NumberDecimal(4.000000000000000000000000000000000")
134
+ "side_b" : NumberDecimal(" 4.000000000000000000000000000000000")
135
135
}
136
136
137
137
Since ``angle_a`` and ``side_a`` are stored as
Original file line number Diff line number Diff line change @@ -394,10 +394,10 @@ Examples
394
394
.. code-block:: javascript
395
395
:copyable: false
396
396
397
- { _id" : "M", averagePrice: NumberDecimal("120") }
398
- { _id" : "L", averagePrice: NumberDecimal("80") }
399
- { _id" : "S", averagePrice: NumberDecimal("80") }
400
- { _id" : null, averagePrice: NumberDecimal("45.25") }
397
+ { _id : "M", averagePrice: NumberDecimal("120") }
398
+ { _id : "L", averagePrice: NumberDecimal("80") }
399
+ { _id : "S", averagePrice: NumberDecimal("80") }
400
+ { _id : null, averagePrice: NumberDecimal("45.25") }
401
401
402
402
.. seealso::
403
403
You can’t perform that action at this time.
0 commit comments