Skip to content

Commit 90c8e7f

Browse files
author
Chris Cho
authored
DOCSP-22817: add walltime to changedocument output (#240)
* DOCSP-22817: add walltime to changedocument output
1 parent 1af0f8b commit 90c8e7f

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

snooty.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name = "java"
22
title = "Java Sync"
3-
intersphinx = ["https://mongodb.com/docs/manual/objects.inv",
4-
"https://mongodb.com/docs/drivers/objects.inv"]
3+
intersphinx = [
4+
"https://www.mongodb.com/docs/manual/objects.inv",
5+
"https://www.mongodb.com/docs/drivers/objects.inv"
6+
]
57

68
toc_landing_pages = [
79
"/fundamentals/connection",

source/fundamentals/indexes.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,8 @@ the ``vendors`` collection:
418418

419419
See the MongoDB server manual sections for more information:
420420

421-
- :ref:`Clustered Indexes <db.createCollection.clusteredIndex>`
422-
- :ref:`Clustered Collections <clustered-collections>`
421+
- :v6.0:`Clustered Index </reference/method/db.createCollection/#std-label-db.createCollection.clusteredIndex>`
422+
- :v6.0:`Clustered Collections </core/clustered-collections>`
423423

424424
Remove an Index
425425
---------------

source/usage-examples/watch.txt

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ Watch for Changes
99
You can keep track of changes to data in MongoDB, such as changes to a
1010
collection, database, or deployment, by opening a **change stream**. A change
1111
stream allows applications to watch for changes to data and react to them.
12-
The change stream returns **change event** documents when changes occur.
13-
You can open a change stream by calling the ``watch()`` method on
14-
a ``MongoCollection``, ``MongoDatabase``, or ``MongoClient`` object:
12+
13+
The change stream returns **change event** documents when changes occur. A
14+
change event contains information about the updated data.
15+
16+
Open a change stream by calling the ``watch()`` method on a
17+
``MongoCollection``, ``MongoDatabase``, or ``MongoClient`` object as shown in
18+
the following code example:
1519

1620
.. code-block:: java
1721

@@ -134,27 +138,29 @@ pipeline filters out the ``delete`` operation:
134138

135139
Received a change to the collection: ChangeStreamDocument{
136140
operationType=OperationType{value='insert'},
137-
resumeToken={"_data": "825EC..."},
141+
resumeToken={"_data": "825E..."},
138142
namespace=sample_mflix.movies,
139143
destinationNamespace=null,
140144
fullDocument=Document{{_id=5ec3..., test=sample movie document}},
141145
documentKey={"_id": {"$oid": "5ec3..."}},
142146
clusterTime=Timestamp{...},
143147
updateDescription=null,
144148
txnNumber=null,
145-
lsid=null
149+
lsid=null,
150+
wallTime=BsonDateTime{value=1657...}
146151
}
147152
Received a change to the collection: ChangeStreamDocument{
148153
operationType=OperationType{value='update'},
149-
resumeToken={"_data": "825EC..."},
154+
resumeToken={"_data": "825E..."},
150155
namespace=sample_mflix.movies,
151156
destinationNamespace=null,
152157
fullDocument=Document{{_id=5ec3..., test=sample movie document, field2=sample movie document update}},
153158
documentKey={"_id": {"$oid": "5ec3..."}},
154159
clusterTime=Timestamp{...},
155160
updateDescription=UpdateDescription{removedFields=[], updatedFields={"field2": "sample movie document update"}},
156161
txnNumber=null,
157-
lsid=null
162+
lsid=null,
163+
wallTime=BsonDateTime{value=1657...}
158164
}
159165

160166
You should also see output from the ``WatchCompanion`` application that

0 commit comments

Comments
 (0)