@@ -60,9 +60,9 @@ aggregation pipeline to update the document with ``_id: 3``:
60
60
Specifically, the pipeline consists of a :pipeline:`$set` stage
61
61
which adds the ``test3`` field (and sets its value to ``98``) to the
62
62
document and sets the ``modified`` field to the current datetime.
63
- For the current datetime, the operation uses the aggregation
64
- variable :variable:`NOW` for the (to access the variable, prefix with ``$$``
65
- and enclose in quotes) .
63
+ The operation uses the aggregation variable :variable:`NOW` for the
64
+ current datetime. To access the variable, prefix with ``$$`` and enclose
65
+ in quotes.
66
66
67
67
To verify the update, you can query the collection:
68
68
@@ -120,14 +120,14 @@ Specifically, the pipeline consists of:
120
120
:expression:`$mergeObjects` expression to set default values for
121
121
the ``quiz1``, ``quiz2``, ``test1`` and ``test2`` fields. The
122
122
aggregation variable :variable:`ROOT` refers to the current
123
- document being modified (to access the variable, prefix with
124
- ``$$`` and enclose in quotes) . The current document fields will
123
+ document being modified. To access the variable, prefix with
124
+ ``$$`` and enclose in quotes. The current document fields will
125
125
override the default values.
126
126
127
127
- a :pipeline:`$set` stage to update the ``modified`` field to the
128
- current datetime. For the current datetime, the operation uses the
129
- aggregation variable :variable:`NOW` for the (to access the
130
- variable, prefix with ``$$`` and enclose in quotes) .
128
+ current datetime. The operation uses the aggregation variable
129
+ :variable:`NOW` for the current datetime. To access the variable,
130
+ prefix with ``$$`` and enclose in quotes.
131
131
132
132
To verify the update, you can query the collection:
133
133
@@ -192,9 +192,9 @@ Specifically, the pipeline consists of:
192
192
of the ``tests`` array elements and to update the ``modified``
193
193
field to the current datetime. To calculate the truncated average,
194
194
the stage uses the :group:`$avg` and :expression:`$trunc`
195
- expressions. For the current datetime, the operation uses the
196
- aggregation variable :variable:`NOW` for the (to access the
197
- variable, prefix with ``$$`` and enclose in quotes)
195
+ expressions. The operation uses the aggregation variable
196
+ :variable:`NOW` for the current datetime. To access the variable,
197
+ prefix with ``$$`` and enclose in quotes.
198
198
199
199
- a :pipeline:`$set` stage to add the ``grade`` field based on the
200
200
``average`` using the :expression:`$switch` expression.
0 commit comments