Skip to content

Commit 068c15b

Browse files
[DOCSP-50122] Remove next() info on explain() method {consistency} (#12290) (#12395)
1 parent 253f6c8 commit 068c15b

File tree

6 files changed

+9
-69
lines changed

6 files changed

+9
-69
lines changed

content/manual/upcoming/source/includes/fact-explain-methods-differences.rst

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ following key differences:
66
additional chaining of query modifiers. For list of query modifiers,
77
see :ref:`db.collection.explain().find().help() <explain-method-help>`.
88

9-
- The :method:`db.collection.find().explain() <db.collection.explain()>` returns a cursor, which
10-
requires a call to ``.next()``, or its alias ``.finish()``, to return
11-
the ``explain()`` results.
12-
If run interactively in :binary:`~bin.mongosh`,
13-
:binary:`~bin.mongosh` automatically calls ``.finish()`` to return
14-
the results. For scripts, however, you must explicitly call
15-
``.next()``, or ``.finish()``, to return the results. For list of
16-
cursor-related methods, see
17-
:ref:`db.collection.explain().find().help() <explain-method-help>`.
9+
- The :method:`db.collection.find().explain() <db.collection.explain()>` returns
10+
the ``explain()`` information on the query plan.
11+

content/manual/upcoming/source/reference/method/db.collection.explain.txt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -299,17 +299,3 @@ For a list of query modifiers available, run the following in
299299
.. code-block:: javascript
300300

301301
db.collection.explain().find().help()
302-
303-
Iterate the ``explain().find()`` Return Cursor
304-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
305-
306-
:method:`db.collection.explain().find() <db.collection.explain()>`
307-
returns a cursor to the explain results. If run interactively in
308-
:binary:`~bin.mongosh`, :binary:`~bin.mongosh` automatically
309-
iterates the cursor using the ``.next()`` method. For scripts, however,
310-
you must explicitly call ``.next()`` (or its alias ``.finish()``) to
311-
return the results:
312-
313-
.. code-block:: javascript
314-
315-
var explainResult = db.products.explain().find( { category: "apparel" } ).next();

content/manual/v6.0/source/includes/fact-explain-methods-differences.rst

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ following key differences:
66
additional chaining of query modifiers. For list of query modifiers,
77
see :ref:`db.collection.explain().find().help() <explain-method-help>`.
88

9-
- The :method:`db.collection.find().explain() <db.collection.explain()>` returns a cursor, which
10-
requires a call to ``.next()``, or its alias ``.finish()``, to return
11-
the ``explain()`` results.
12-
If run interactively in :binary:`~bin.mongosh`,
13-
:binary:`~bin.mongosh` automatically calls ``.finish()`` to return
14-
the results. For scripts, however, you must explicitly call
15-
``.next()``, or ``.finish()``, to return the results. For list of
16-
cursor-related methods, see
17-
:ref:`db.collection.explain().find().help() <explain-method-help>`.
9+
- The :method:`db.collection.find().explain() <db.collection.explain()>` returns
10+
the ``explain()`` information on the query plan.
11+

content/manual/v6.0/source/reference/method/db.collection.explain.txt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -283,17 +283,3 @@ For a list of query modifiers available, run the following in
283283
.. code-block:: javascript
284284

285285
db.collection.explain().find().help()
286-
287-
Iterate the ``explain().find()`` Return Cursor
288-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
289-
290-
:method:`db.collection.explain().find() <db.collection.explain()>`
291-
returns a cursor to the explain results. If run interactively in
292-
:binary:`~bin.mongosh`, :binary:`~bin.mongosh` automatically
293-
iterates the cursor using the ``.next()`` method. For scripts, however,
294-
you must explicitly call ``.next()`` (or its alias ``.finish()``) to
295-
return the results:
296-
297-
.. code-block:: javascript
298-
299-
var explainResult = db.products.explain().find( { category: "apparel" } ).next();

content/manual/v7.0/source/includes/fact-explain-methods-differences.rst

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ following key differences:
66
additional chaining of query modifiers. For list of query modifiers,
77
see :ref:`db.collection.explain().find().help() <explain-method-help>`.
88

9-
- The :method:`db.collection.find().explain() <db.collection.explain()>` returns a cursor, which
10-
requires a call to ``.next()``, or its alias ``.finish()``, to return
11-
the ``explain()`` results.
12-
If run interactively in :binary:`~bin.mongosh`,
13-
:binary:`~bin.mongosh` automatically calls ``.finish()`` to return
14-
the results. For scripts, however, you must explicitly call
15-
``.next()``, or ``.finish()``, to return the results. For list of
16-
cursor-related methods, see
17-
:ref:`db.collection.explain().find().help() <explain-method-help>`.
9+
- The :method:`db.collection.find().explain() <db.collection.explain()>` returns
10+
the ``explain()`` information on the query plan.
11+

content/manual/v7.0/source/reference/method/db.collection.explain.txt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -283,17 +283,3 @@ For a list of query modifiers available, run the following in
283283
.. code-block:: javascript
284284

285285
db.collection.explain().find().help()
286-
287-
Iterate the ``explain().find()`` Return Cursor
288-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
289-
290-
:method:`db.collection.explain().find() <db.collection.explain()>`
291-
returns a cursor to the explain results. If run interactively in
292-
:binary:`~bin.mongosh`, :binary:`~bin.mongosh` automatically
293-
iterates the cursor using the ``.next()`` method. For scripts, however,
294-
you must explicitly call ``.next()`` (or its alias ``.finish()``) to
295-
return the results:
296-
297-
.. code-block:: javascript
298-
299-
var explainResult = db.products.explain().find( { category: "apparel" } ).next();

0 commit comments

Comments
 (0)