Skip to content

Commit 0bac6cf

Browse files
committed
MM feedback
1 parent 1ce3801 commit 0bac6cf

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

source/read/cursor.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ In this guide, you can learn how to access data from a **cursor** by using the
2424
{+php-library+}.
2525

2626
A cursor is a mechanism that returns the results of a read operation in iterable
27-
batches. Cursors reduce both memory consumption and network bandwidth usage by holding
28-
only a subset of documents at any given time rather than returning all documents at
29-
once.
27+
batches. Cursors reduce both memory consumption and the number of server requests
28+
by holding only a subset of documents at any given time, rather than returning all
29+
documents at once.
3030

3131
Whenever the {+php-library+} performs a read operation by using the ``MongoDB\Collection::find()``
3232
method, it returns the matching documents in a ``MongoDB\Driver\Cursor`` instance.
@@ -56,7 +56,7 @@ Access Cursor Contents Iteratively
5656
To iterate over the contents of a ``MongoDB\Driver\Cursor`` instance, use a ``foreach`` loop.
5757

5858
The following example uses the ``MongoDB\Collection::find()`` method to retrieve all documents
59-
in which the ``name`` value is ``'Dunkin' Donuts'``. It then prints each document from the
59+
in which the ``name`` field value is ``'Dunkin' Donuts'``. It then prints each document from the
6060
cursor returned by the ``find()`` method:
6161

6262
.. io-code-block::
@@ -84,8 +84,8 @@ a ``MongoDB\Driver\Cursor`` instance. This method returns the document that the
8484
initially points to. You can continue to advance the cursor by calling the ``next()``
8585
method, which instructs the cursor to point to the next retrieved document.
8686

87-
The following example finds all documents in a collection that have a ``name`` value
88-
of ``'Dunkin' Donuts'``. Then, it prints the first retrieved document by calling the
87+
The following example finds all documents in which the ``name`` field value is
88+
``'Dunkin' Donuts'``. Then, it prints the first retrieved document by calling the
8989
``current()`` method on a cursor:
9090

9191
.. io-code-block::
@@ -110,8 +110,8 @@ Retrieve All Documents
110110
application memory, your program will crash. If you expect a large result
111111
set, :ref:`access your cursor iteratively <php-cursors-iterate>`.
112112

113-
To retrieve all documents from a cursor, convert the cursor into an array as
114-
shown in the following example:
113+
To retrieve all documents from a cursor, convert the cursor into an array. The following
114+
example calls the ``toArray()`` method on a cursor to store its results in an array:
115115

116116
.. literalinclude:: /includes/read/cursor.php
117117
:language: php
@@ -158,7 +158,7 @@ collection. After the cursor is exhausted, it remains open until retrieving thre
158158
If you insert another document into the ``vegetables`` collection, the preceding code prints
159159
the new document and closes the ``while`` loop.
160160

161-
To learn more about tailable cursors, see the :manual:`Tailable Cursors guide
161+
To learn more about tailable cursors, see :manual:`Tailable Cursors
162162
</core/tailable-cursors/>` in the {+mdb-server+} manual.
163163

164164
Additional Information
@@ -175,5 +175,5 @@ To learn more about cursors, see the following pages in the PHP manual:
175175
API Documentation
176176
~~~~~~~~~~~~~~~~~
177177

178-
To learn more about the ``find()`` method, see `MongoDB\\Collection::find()
179-
<{+api+}/method/MongoDBCollection-find/>`__ in the API documentation.
178+
To learn more about the ``find()`` method, see the API documentation for
179+
`MongoDB\\Collection::find() <{+api+}/method/MongoDBCollection-find/>`__.

0 commit comments

Comments
 (0)