Skip to content

Commit 6566f4c

Browse files
committed
DOCS-860 addOption shorten example to add only one option
1 parent 9708faa commit 6566f4c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

source/reference/method/cursor.addOption.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@ cursor.addOption()
1919
list, see your :doc:`driver documentation </applications/drivers>`.
2020

2121
The following example in the :program:`mongo` shell adds the
22-
``DBQuery.Option.tailable`` and ``DBQuery.Option.awaitData`` flags
23-
to ensure the cursor returned from the query is a tailable cursor
24-
that waits for a few seconds when the cursor reaches the end of the
25-
data:
22+
``DBQuery.Option.tailable`` flag to ensure the cursor returned from
23+
the query is a tailable cursor:
2624

2725
.. code-block:: javascript
2826

29-
var cursor = db.myCappedCollection.find().addOption(DBQuery.Option.tailable).
30-
addOption(DBQuery.Option.awaitData);
27+
var t = db.myCappedCollection;
28+
var cursor = t.find().addOption(DBQuery.Option.tailable);
3129

3230
.. warning:: Adding incorrect wire protocol flags can cause problems
3331
and/or extra server load.

0 commit comments

Comments
 (0)