Skip to content

Commit e893eea

Browse files
committed
DOCS-4996 negative limit
1 parent c37d8c2 commit e893eea

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

source/reference/method/cursor.limit.txt

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,19 @@ Supported Values
3030
The behavior of :method:`~cursor.limit()` is undefined for values less
3131
than -2\ :sup:`31` and greater than 2\ :sup:`31`.
3232

33+
Zero Value
34+
~~~~~~~~~~
35+
36+
A :method:`~cursor.limit()` value of 0 (i.e. :method:`.limit(0)
37+
<cursor.limit()>`) is equivalent to setting no limit.
38+
3339
Negative Values
3440
~~~~~~~~~~~~~~~
3541

36-
A :method:`~cursor.limit()` value of 0 (i.e. :method:`.limit(0)
37-
<cursor.limit()>`) is equivalent to setting no limit. A negative
38-
limit is similar to a positive limit, but a negative limit prevents
39-
the creation of a cursor such that only a single batch of results is
40-
returned. As such, with a negative limit, if the limited result set
41-
does not fit into a single batch, the number of documents received
42-
will be less than the limit.
42+
A negative limit is similar to a positive limit but closes the cursor
43+
after returning a single :ref:`batch <cursor-batches>` of results. As
44+
such, with a negative limit, if the limited result set does not fit
45+
into a single batch, the number of documents received will be less than
46+
the specified limit. By passing a negative limit, the client indicates
47+
to the server that it will not ask for a subsequent batch via
48+
``getMore``.

0 commit comments

Comments
 (0)