@@ -86,7 +86,7 @@ following table describes each field in the change stream response document:
86
86
<view-fcv>` at the time of the change stream's
87
87
opening/resumption. See :ref:`change-stream-resume-token` for the
88
88
full list of ``_data`` types.
89
-
89
+
90
90
See :ref:`change-stream-resume` for an example of resuming a
91
91
change stream by ``resumeToken``.
92
92
@@ -170,7 +170,6 @@ following table describes each field in the change stream response document:
170
170
* - ``to.db``
171
171
- string
172
172
- The new name of the database.
173
- -
174
173
175
174
* - ``to.coll``
176
175
- string
@@ -315,7 +314,7 @@ following table describes each field in the change stream response document:
315
314
* - ``operationDescription.to.db``
316
315
- string
317
316
- Indicates the new dataname name of the renamed collection.
318
-
317
+
319
318
.. versionadded:: 6.0
320
319
321
320
* - ``operationDescription.to.coll``
@@ -356,7 +355,7 @@ following table describes each field in the change stream response document:
356
355
transaction </core/transactions>`, the associated change stream
357
356
notifications will have the same ``clusterTime`` value, namely
358
357
the time when the transaction was committed.
359
-
358
+
360
359
On a sharded cluster, events that occur on different shards can
361
360
have the same ``clusterTime`` but be associated with different
362
361
transactions or even not be associated with any transaction. To
@@ -375,7 +374,7 @@ following table describes each field in the change stream response document:
375
374
376
375
.. versionadded:: 6.0
377
376
378
- * - ``txnNumber``
377
+ * - ``txnNumber``
379
378
- NumberLong
380
379
381
380
- The transaction number.
@@ -409,15 +408,15 @@ The following example illustrates an ``insert`` event:
409
408
clusterTime: <Timestamp>,
410
409
wallTime: <ISODate>,
411
410
ns: {
412
- db: 'engineering',
411
+ db: 'engineering',
413
412
coll: 'users'
414
413
},
415
414
documentKey: {
416
- userName: 'alice123',
415
+ userName: 'alice123',
417
416
_id: ObjectId("599af247bb69cd89961c986d")
418
417
},
419
418
fullDocument: {
420
- _id: ObjectId("599af247bb69cd89961c986d"),
419
+ _id: ObjectId("599af247bb69cd89961c986d"),
421
420
userName: 'alice123',
422
421
name: 'Alice'
423
422
}
@@ -444,8 +443,8 @@ The following example illustrates an ``update`` event:
444
443
operationType: 'update',
445
444
clusterTime: <Timestamp>,
446
445
wallTime: <ISODate>,
447
- ns: {
448
- db: 'engineering',
446
+ ns: {
447
+ db: 'engineering',
449
448
coll: 'users'
450
449
},
451
450
documentKey: {
@@ -473,8 +472,8 @@ opened with the ``fullDocument : updateLookup`` option:
473
472
operationType: 'update',
474
473
clusterTime: <Timestamp>,
475
474
wallTime: <ISODate>,
476
- ns: {
477
- db: 'engineering',
475
+ ns: {
476
+ db: 'engineering',
478
477
coll: 'users'
479
478
},
480
479
documentKey: {
@@ -490,7 +489,7 @@ opened with the ``fullDocument : updateLookup`` option:
490
489
"newSize" : 36
491
490
} ]
492
491
},
493
- fullDocument: {
492
+ fullDocument: {
494
493
_id: ObjectId("58a4eb4a30c75625e00d2820"),
495
494
name: 'Alice',
496
495
userName: 'alice123',
@@ -522,19 +521,19 @@ The following example illustrates a ``replace`` event:
522
521
clusterTime: <Timestamp>,
523
522
wallTime: <ISODate>,
524
523
ns: {
525
- db: 'engineering',
524
+ db: 'engineering',
526
525
coll: 'users'
527
526
},
528
- documentKey: {
527
+ documentKey: {
529
528
_id: ObjectId("599af247bb69cd89961c986d")
530
529
},
531
530
fullDocument: {
532
- _id: ObjectId("599af247bb69cd89961c986d"),
531
+ _id: ObjectId("599af247bb69cd89961c986d"),
533
532
userName: 'alice123',
534
533
name: 'Alice'
535
534
}
536
535
}
537
-
536
+
538
537
A ``replace`` operation uses the update command, and consists of two stages:
539
538
540
539
- Delete the original document with the ``documentKey`` and
0 commit comments