File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
source/reference/operator/aggregation Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -80,10 +80,12 @@ the :dbcommand:`aggregate` command.
80
80
var cur = db.names.aggregate( [
81
81
{ $changeStream: {} }
82
82
] )
83
- cur.next()
84
83
85
- When the change stream detects a change, the ``next()`` method returns a change
86
- event notification. For example:
84
+ To open the cursor, run ``cur``.
85
+
86
+ When the change stream detects a change, the ``next()`` method returns
87
+ a change event notification. For example, after running ``cur.next()``,
88
+ MongoDB returns a document similar to the following:
87
89
88
90
.. code-block:: json
89
91
:copyable: false
@@ -94,7 +96,6 @@ event notification. For example:
94
96
},
95
97
"operationType": "insert",
96
98
"clusterTime": Timestamp({ t: 1659039316, i: 2 }),
97
- "wallTime": ISODate("2022-07-28T20:15:16.148Z"),
98
99
"fullDocument": {
99
100
"_id": ObjectId("62e2ee54c8756c0d5cf6f072"),
100
101
"name": "Walker Percy"
@@ -107,4 +108,4 @@ event notification. For example:
107
108
}
108
109
109
110
For more information on change stream notifications, see :ref:`Change Events
110
- <change-events>`
111
+ <change-events>`.
You can’t perform that action at this time.
0 commit comments