Skip to content

Commit 403cce2

Browse files
authored
Merge pull request #421 from kvwalker/PHPLIB-288
PHPLIB-288 Document how to specify singleBatch option with Find
2 parents 2a60a81 + fa1585a commit 403cce2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/includes/apiargs-MongoDBCollection-method-find-option.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ type: integer
3535
description: |
3636
The maximum number of documents to return. If unspecified, then defaults to no
3737
limit. A limit of ``0`` is equivalent to setting no limit.
38+
39+
A negative limit is similar to a positive limit but closes the cursor after
40+
returning a single batch of results. As such, with a negative limit, if the
41+
limited result set does not fit into a single batch, the number of documents
42+
received will be less than the specified limit. By passing a negative limit, the
43+
client indicates to the server that it will not ask for a subsequent batch via
44+
getMore.
3845
interface: phpmethod
3946
operation: ~
4047
optional: true

0 commit comments

Comments
 (0)