Skip to content

Commit 0b2b0d9

Browse files
authored
DOCSP-30942 changeStream option (#3470) (#3535)
* added changeStreams * DOCSP-30942 added changeStreams * changed link * changing headings * took out previous changes, added showExpandedEvents on the correct page * took out changestream * spacing stuff * fixed formatting again * spacing issue
1 parent 6db465e commit 0b2b0d9

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

source/reference/method/db.collection.watch.txt

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ Definition
5959
- Description
6060

6161
* - ``resumeAfter``
62-
6362
- document
64-
6563
- Optional. Directs :method:`~db.collection.watch` to attempt resuming
6664
notifications starting after the operation specified in the resume
6765
token.
@@ -78,7 +76,6 @@ Definition
7876
* - ``startAfter``
7977

8078
- document
81-
8279
- Optional. Directs :method:`~db.collection.watch` to attempt starting a new
8380
change stream after the operation specified in the resume token.
8481
Allows notifications to resume after an invalidate event.
@@ -97,7 +94,6 @@ Definition
9794
* - ``fullDocument``
9895

9996
- string
100-
10197
- Optional. By default, :method:`~db.collection.watch()` returns the delta of
10298
those fields modified by an update operation, instead of the entire
10399
updated document.
@@ -112,6 +108,7 @@ Definition
112108

113109

114110
* - ``fullDocumentBeforeChange``
111+
115112
- string
116113
- Optional.
117114

@@ -121,7 +118,6 @@ Definition
121118
* - ``batchSize``
122119

123120
- int
124-
125121
- Optional. Specifies the maximum number of change events to return in each
126122
batch of the response from the MongoDB cluster.
127123

@@ -132,7 +128,6 @@ Definition
132128
* - ``maxAwaitTimeMS``
133129

134130
- int
135-
136131
- Optional. The maximum amount of time in milliseconds the server waits for new
137132
data changes to report to the change stream cursor before returning an
138133
empty batch.
@@ -144,7 +139,6 @@ Definition
144139
* - ``collation``
145140

146141
- document
147-
148142
- Optional. Pass a :ref:`collation document <collation-document-fields>`
149143
to specify a collation for the change stream cursor.
150144

@@ -153,11 +147,22 @@ Definition
153147
collection would inherit the collection's default collation.
154148

155149

156-
150+
* - ``showExpandedEvents``
151+
152+
- boolean
153+
- Optional. Starting in MongoDB 6.0, change streams support change
154+
notifications for DDL events, like the :ref:`createIndexes <change-event-createIndexes>`
155+
and :ref:`dropIndexes <change-event-dropIndexes>` events. To include
156+
expanded events in a change stream, create the change stream cursor
157+
using the ``showExpandedEvents`` option.
158+
159+
.. versionadded:: 6.0
160+
161+
162+
157163
* - ``startAtOperationTime``
158164

159165
- Timestamp
160-
161166
- Optional. The starting point for the change stream. If the specified starting
162167
point is in the past, it must be in the time range of the oplog. To
163168
check the time range of the oplog, see

0 commit comments

Comments
 (0)