Skip to content

Commit 43a0162

Browse files
DOCSP-21009 watch usage example (#307)
* updated intro
1 parent cb9bac8 commit 43a0162

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

source/usage-examples/changeStream.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,15 @@ Watch for Changes
77
Open a Change Stream
88
--------------------
99

10-
You can watch for changes to a single collection, a database, or an entire deployment in MongoDB with **Change Streams**.
11-
Open a change stream by calling the ``watch()`` method on a ``Collection``, ``Db``, or ``MongoClient`` object. The
12-
change stream emits **change event** documents when they occur.
10+
You can watch for changes in MongoDB using the ``watch()`` method on the
11+
following objects:
12+
13+
- `Collection <{+api+}/classes/Collection.html#watch>`__
14+
- `Database <{+api+}/classes/Db.html#watch>`__
15+
- `MongoClient <{+api+}/classes/MongoClient.html#watch>`__
16+
17+
For each object, the ``watch()`` method opens a **change stream** to
18+
emit **change event** documents when they occur.
1319

1420
The ``watch()`` method optionally takes an **aggregation pipeline** which consists of an array of **aggregation stages**
1521
as the first parameter. The aggregation stages filter and transform the change events.

0 commit comments

Comments
 (0)