Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions source/reference/method/cursor.batchSize.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ cursor.batchSize()
.. method:: cursor.batchSize()

The :method:`batchSize() <cursor.batchSize()>` method specifies the
number of documents to return in each batch of the response from
the MongoDB instance. In most cases, modifying the batch size will
applications since the :program:`mongo`
shell and most :doc:`drivers </applications/drivers>` return results as if
MongoDB returned a single batch.
number of documents to return in each batch of the response from the
MongoDB instance. In most cases, modifying the batch size will
not affect the user or the application since the
:program:`mongo` shell and most :doc:`drivers
</applications/drivers>` return results as if MongoDB returned a
single batch.

The :method:`batchSize() <cursor.batchSize()>` method takes the
following parameter:
Expand All @@ -31,7 +32,7 @@ cursor.batchSize()

.. code-block:: javascript

db.animals.find().batchSize(10)
db.inventory.find().batchSize(10)

This operation will set the batch size for the results of a query
(i.e. :method:`find() <db.collection.find()>`) to ``10``. The
Expand Down