Skip to content

Commit 0d8383f

Browse files
committed
CDRIVER-1996 document maxAwaitTimeMS
1 parent 6432c3d commit 0d8383f

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

doc/mongoc_collection_find_with_opts.rst

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -111,29 +111,35 @@ The following options are supported.
111111
======================= ================== =================== ==================
112112
Option BSON type Option BSON type
113113
======================= ================== =================== ==================
114-
``projection`` document ``max`` document
115-
``sort`` document ``maxScan`` non-negative int64
116-
``skip`` non-negative int64 ``maxTimeMS`` non-negative int64
117-
``limit`` non-negative int64 ``min`` document
118-
``batchSize`` non-negative int64 ``noCursorTimeout`` bool
119-
``exhaust`` bool ``oplogReplay`` bool
120-
``hint`` string or document ``returnKey`` bool
121-
``allowPartialResults`` bool ``showRecordId`` bool
122-
``awaitData`` bool ``singleBatch`` bool
123-
``collation`` document ``snapshot`` bool
114+
``projection`` document ``maxScan`` non-negative int64
115+
``sort`` document ``maxTimeMS`` non-negative int64
116+
``skip`` non-negative int64 ``maxAwaitTimeMS`` non-negative int64
117+
``limit`` non-negative int64 ``min`` document
118+
``batchSize`` non-negative int64 ``noCursorTimeout`` bool
119+
``exhaust`` bool ``oplogReplay`` bool
120+
``hint`` string or document ``returnKey`` bool
121+
``allowPartialResults`` bool ``showRecordId`` bool
122+
``awaitData`` bool ``singleBatch`` bool
123+
``collation`` document ``snapshot`` bool
124124
``comment`` string ``tailable`` bool
125+
``max`` document
125126
======================= ================== =================== ==================
126127

128+
All options are documented in the reference page for `the "find" command`_ in the MongoDB server manual, except for "maxAwaitTimeMS".
129+
130+
"maxAwaitTimeMS" is the maximum amount of time for the server to wait on new documents to satisfy a query, if "tailable" and "awaitData" are both true.
131+
If no new documents are found, the tailable cursor receives an empty batch. The "maxAwaitTimeMS" option is ignored for MongoDB older than 3.4.
132+
127133
For some options like "collation", the driver returns an error if the server version is too old to support the feature.
128134
Any fields in ``opts`` that are not listed here are passed to the server unmodified.
129-
130135

131136
See Also
132137
--------
133138

134-
`The "find" command <https://docs.mongodb.org/master/reference/command/find/>`_ in the MongoDB Manual. All options listed there are supported by the C Driver.
139+
`The "find" command`_ in the MongoDB Manual. All options listed there are supported by the C Driver.
135140
For MongoDB servers before 3.2, or for exhaust queries, the driver transparently converts the query to a legacy OP_QUERY message.
136-
141+
142+
.. _the "find" command: https://docs.mongodb.org/master/reference/command/find/
137143

138144
The "explain" command
139145
---------------------

0 commit comments

Comments
 (0)