File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,12 @@ cursor.batchSize()
7
7
.. method:: cursor.batchSize()
8
8
9
9
The :method:`batchSize() <cursor.batchSize()>` method specifies the
10
- number of documents to return in each batch of the response from
11
- the MongoDB instance. In most cases, modifying the batch size will
12
- applications since the :program:`mongo`
13
- shell and most :doc:`drivers </applications/drivers>` return results as if
14
- MongoDB returned a single batch.
10
+ number of documents to return in each batch of the response from the
11
+ MongoDB instance. In most cases, modifying the batch size will
12
+ not affect the user or the application since the
13
+ :program:`mongo` shell and most :doc:`drivers
14
+ </applications/drivers>` return results as if MongoDB returned a
15
+ single batch.
15
16
16
17
The :method:`batchSize() <cursor.batchSize()>` method takes the
17
18
following parameter:
@@ -31,7 +32,7 @@ cursor.batchSize()
31
32
32
33
.. code-block:: javascript
33
34
34
- db.animals .find().batchSize(10)
35
+ db.inventory .find().batchSize(10)
35
36
36
37
This operation will set the batch size for the results of a query
37
38
(i.e. :method:`find() <db.collection.find()>`) to ``10``. The
You can’t perform that action at this time.
0 commit comments