@@ -61,6 +61,7 @@ and prints changes as they occur:
61
61
:end-before: end-open-change-stream
62
62
:language: kotlin
63
63
:copyable:
64
+ :dedent:
64
65
65
66
To begin watching for changes, run the application. Then, in a separate
66
67
application or shell, modify the ``restaurants`` collection. The following
@@ -73,6 +74,7 @@ example updates a document with a ``name`` field value of ``Blarney Castle``:
73
74
:end-before: end-update-for-change-stream
74
75
:language: kotlin
75
76
:copyable:
77
+ :dedent:
76
78
77
79
When you update the collection, the change stream application prints the change
78
80
as it occurs. The printed change event resembles the
@@ -133,6 +135,7 @@ that records only update operations:
133
135
:end-before: end-change-stream-pipeline
134
136
:language: kotlin
135
137
:copyable:
138
+ :dedent:
136
139
137
140
To learn more about modifying your change stream output, see the
138
141
:manual:`Modify Change Stream Output
@@ -216,7 +219,7 @@ one of the following parameters:
216
219
driver raises an error.
217
220
218
221
The **post-image** is the full version of a document *after* a change. To include the
219
- post-image in the change stream event, pass the ``fullDocument`` method one of the
222
+ post-image in the change stream event, pass the ``fullDocument() `` method one of the
220
223
following parameters:
221
224
222
225
- ``FullDocument.UPDATE_LOOKUP``: The change event includes a copy of the entire changed
@@ -235,6 +238,7 @@ of updated documents by specifying the ``fullDocument`` parameter:
235
238
:end-before: end-change-stream-post-image
236
239
:language: kotlin
237
240
:copyable:
241
+ :dedent:
238
242
239
243
With the change stream application running, updating a document in the
240
244
``restaurants`` collection by using the :ref:`preceding update example
@@ -243,7 +247,7 @@ With the change stream application running, updating a document in the
243
247
244
248
.. code-block:: sh
245
249
246
- Received a change: ChangeStreamDocument{ operationType=update, resumeToken={"_data": "..."},
250
+ ChangeStreamDocument{ operationType=update, resumeToken={"_data": "..."},
247
251
namespace=sample_restaurants.restaurants, destinationNamespace=null, fullDocument=Restaurant(name=Blarney Castle, cuisine=Irish),
248
252
fullDocumentBeforeChange=null, documentKey={"_id": {"$oid": "..."}},
249
253
clusterTime=Timestamp{value=..., seconds=..., inc=...},
0 commit comments