@@ -27,8 +27,7 @@ A BSON document containing the fields making up a MongoDB server command.
2727
2828#### Wire Protocol
2929
30- The binary protocol used to talk with MongoDB over a socket. It's made up by the OP_QUERY, OP_GET_MORE, OP_KILL_CURSORS,
31- OP_INSERT, OP_UPDATE and OP_DELETE.
30+ The binary protocol used to talk with MongoDB over a socket.
3231
3332## Guidance
3433
@@ -49,8 +48,7 @@ Drivers:
4948### find
5049
5150The [ find] ( https://www.mongodb.com/docs/manual/reference/command/find/ ) command replaces the query functionality of the
52- OP_QUERY wire protocol message but cannot execute queries against special collections. Unlike the legacy OP_QUERY wire
53- protocol message, the ** find** command cannot be used to execute other commands.
51+ OP_QUERY wire protocol message but cannot execute queries against special collections.
5452
5553For a successful command, the document returned from the server has the following format:
5654
@@ -180,16 +178,15 @@ Further, after these transformation:
180178
181179#### BatchSize of 1
182180
183- In 3.2 a batchSize of 1 means return a single document for the find command and it will not destroy the cursor after the
184- first batch of documents are returned. Given a query returning 4 documents the number of commands issues will be.
181+ A batchSize of 1 means return a single document for the find command and it will not destroy the cursor after the first
182+ batch of documents are returned. Given a query returning 4 documents the number of commands issues will be.
185183
1861841 . ** find** command with batchSize=1
1871852 . ** getMore** command with batchSize=1
1881863 . ** getMore** command with batchSize=1
1891874 . ** getMore** command with batchSize=1
190188
191- The driver ** SHOULD NOT attempt to emulate the behavior seen in 3.0 or earlier** as the new find command enables the
192- user expected behavior of allowing the first result to contain a single document when specifying batchSize=1.
189+ The ` find ` command allows the first result to contain a single document when specifying batchSize=1.
193190
194191#### Tailable cursors
195192
@@ -242,8 +239,8 @@ to the value of the option **maxAwaitTimeMS**. If no **maxAwaitTimeMS** is speci
242239### getMore
243240
244241The [ getMore] ( https://www.mongodb.com/docs/manual/reference/command/getMore/ ) command replaces the ** OP_GET_MORE** wire
245- protocol message. The query flags passed to OP_QUERY for a getMore command MUST be secondaryOk=true when sent to a
246- secondary. The OP_QUERY namespace MUST be the same as for the ** find** and ** killCursors** commands.
242+ protocol message. The query flags passed to OP_MSG for a getMore command MUST be secondaryOk=true when sent to a
243+ secondary. The OP_MSG namespace MUST be the same as for the ** find** and ** killCursors** commands.
247244
248245``` typescript
249246interface GetMoreCommand {
@@ -296,8 +293,8 @@ The driver's local cursor MUST update its `id` and `ns`, as well as store the `n
296293### killCursors
297294
298295The [ killCursors] ( https://www.mongodb.com/docs/manual/reference/command/killCursors/ ) command replaces the
299- ** OP_KILL_CURSORS** wire protocol message. The OP_QUERY namespace MUST be the same as for the ** find** and ** getMore**
300- commands. The ** killCursors ** command is optional to implement in ** MongoDB 3.2 ** .
296+ ** OP_KILL_CURSORS** wire protocol message. The OP_MSG namespace MUST be the same as for the ** find** and ** getMore**
297+ commands.
301298
302299The command response will be as follows:
303300
@@ -407,11 +404,6 @@ Like other commands, the find and getMore commands will not use the OP_REPLY res
407404
408405## FAQ
409406
410- ### Changes in error handling for 3.2 tailable cursor
411-
412- Tailable cursors pointing to documents in a capped collection that get overwritten will return a zero document result in
413- MongoDB 3.0 or earlier but will return an error in MongoDB 3.2
414-
415407### Explain command
416408
417409There is no equivalent of the ` $explain ` modifier in the find command. The driver SHOULD use the ** explain** command.
0 commit comments