Skip to content
Merged
Show file tree
Hide file tree
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
15 changes: 13 additions & 2 deletions pymongo/asynchronous/command_cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""CommandCursor class to iterate over command results."""
"""AsyncCommandCursor class to iterate over command results."""

from __future__ import annotations

Expand Down Expand Up @@ -42,7 +42,18 @@


class AsyncCommandCursor(_AsyncCursorBase[_DocumentType]):
"""An asynchronous cursor / iterator over command cursors."""
"""An asynchronous cursor / iterator over command cursors.
Used by :meth:`~pymongo.asynchronous.collection.AsyncCollection.aggregate`,
:meth:`~pymongo.asynchronous.database.AsyncDatabase.aggregate`,
:meth:`~pymongo.asynchronous.collection.AsyncCollection.list_indexes`,
:meth:`~pymongo.asynchronous.collection.AsyncCollection.list_search_indexes`
:meth:`~pymongo.asynchronous.database.AsyncDatabase.list_collections`,
:meth:`~pymongo.asynchronous.database.AsyncDatabase.cursor_command`,
and :meth:`~pymongo.asynchronous.mongo_client.AsyncMongoClient.list_databases`
to iterate MongoDB command results.

Should not be called directly by application developers.
"""

_getmore_class = _GetMore

Expand Down
4 changes: 2 additions & 2 deletions pymongo/asynchronous/cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ def __init__(
let: Optional[bool] = None,
) -> None:
"""Create a new cursor.
Used by :meth:`~pymongo.asynchronous.collection.AsyncCollection.find` to iterate over MongoDB query results.

Should not be called directly by application developers - see
:meth:`~pymongo.asynchronous.collection.AsyncCollection.find` instead.
Should not be called directly by application developers.

.. seealso:: The MongoDB documentation on `cursors <https://dochub.mongodb.org/core/cursors>`_.
"""
Expand Down
13 changes: 12 additions & 1 deletion pymongo/synchronous/command_cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,18 @@


class CommandCursor(_CursorBase[_DocumentType]):
"""A cursor / iterator over command cursors."""
"""A cursor / iterator over command cursors.
Used by :meth:`~pymongo.collection.Collection.aggregate`,
:meth:`~pymongo.database.Database.aggregate`,
:meth:`~pymongo.collection.Collection.list_indexes`,
:meth:`~pymongo.collection.Collection.list_search_indexes`
:meth:`~pymongo.database.Database.list_collections`,
:meth:`~pymongo.database.Database.cursor_command`,
and :meth:`~pymongo.mongo_client.MongoClient.list_databases`
to iterate MongoDB command results.

Should not be called directly by application developers.
"""

_getmore_class = _GetMore

Expand Down
4 changes: 2 additions & 2 deletions pymongo/synchronous/cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ def __init__(
let: Optional[bool] = None,
) -> None:
"""Create a new cursor.
Used by :meth:`~pymongo.collection.Collection.find` to iterate over MongoDB query results.

Should not be called directly by application developers - see
:meth:`~pymongo.collection.Collection.find` instead.
Should not be called directly by application developers.

.. seealso:: The MongoDB documentation on `cursors <https://dochub.mongodb.org/core/cursors>`_.
"""
Expand Down
Loading