翻译或纠错本页面
- Reference >
- Database Commands >
- Query and Write Operation Commands >
- getMore
getMore¶
On this page
Definition¶
- getMore¶
3.2 新版功能.
Use in conjunction with commands that return a cursor, e.g. find and aggregate, to return subsequent batches of documents currently pointed to by the cursor.
The getMore command has the following form:
{ "getMore": <long>, "collection": <string>, "batchSize": <int>, "maxTimeMS": <int> }
The command accepts the following fields:
Field Type Description getMore long The cursor id. collection string The name of the collection over which the cursor is operating. batchSize positive integer Optional. The number of documents to return in the batch. maxTimeMS positive integer Optional. The maximum time period in milliseconds the getMore() operation will block waiting for new data to be inserted into the capped collection.
Requires that the cursor on which this getMore() is acting is an awaitData cursor. See the awaitData parameter for find().