@@ -55,7 +55,7 @@ command, which returns information about the server:
55
55
56
56
.. io-code-block::
57
57
:copyable: true
58
-
58
+
59
59
.. input:: /includes/run-command.py
60
60
:language: python
61
61
:start-after: start-hello
@@ -131,7 +131,7 @@ Command Cursor
131
131
132
132
The ``command()`` method returns the result of the command that was run.
133
133
You can also use the ``cursor_command()`` method, which issues a MongoDB
134
- command and parses the response as a `CommandCursor <{+api-root+}command_cursor.html#pymongo.command_cursor.CommandCursor>`__.
134
+ command and parses the response as a `CommandCursor <{+api-root+}pymongo/ command_cursor.html#pymongo.command_cursor.CommandCursor>`__.
135
135
The ``CommandCursor`` can be used to iterate over command results.
136
136
137
137
The following example uses the ``cursor_command()`` method on the ``sample_mflix``
@@ -172,9 +172,9 @@ you can handle the ``CommandCursor`` accordingly.
172
172
173
173
The ``command()`` and ``cursor_command()`` methods do not obey the read preference you might
174
174
have set on your ``Database`` instance elsewhere in your code. If a
175
- `Client Session <{+api-root+}bson/objectid .html#bson.objectid.ObjectId >`__ is
175
+ `Client Session <{+api-root+}pymongo/client_session .html#pymongo.client_session.ClientSession >`__ is
176
176
provided by using the ``session`` parameter, and this session is in a
177
- `transaction <{+api-root+}client_session.html#transactions>`__, the command's
177
+ `transaction <{+api-root+}pymongo/ client_session.html#transactions>`__, the command's
178
178
read preference will be set to the transaction's read preference. Otherwise,
179
179
the command's read preference defaults to ``PRIMARY``.
180
180
@@ -188,7 +188,7 @@ you can handle the ``CommandCursor`` accordingly.
188
188
:end-before: end-readpref
189
189
190
190
Learn more about the ``read_preferences`` module in the `API documentation
191
- <{+api-root+}read_preferences.html#module-pymongo.read_preferences>`__.
191
+ <{+api-root+}pymongo/ read_preferences.html#module-pymongo.read_preferences>`__.
192
192
193
193
To learn more about read preference options, see :manual:`Read
194
194
Preference </core/read-preference/>` in the {+mdb-server+} manual.
@@ -243,5 +243,5 @@ API Documentation
243
243
For more information about the ``command()`` and ``cursor_command()`` methods,
244
244
see the following {+driver-short+} API documentation:
245
245
246
- - `command() <{+api-root+}database.html#pymongo.database.Database.command>`__
247
- - `cursor_command() <{+api-root+}database.html#pymongo.database.Database.cursor_command>`__
246
+ - `command() <{+api-root+}pymongo/ database.html#pymongo.database.Database.command>`__
247
+ - `cursor_command() <{+api-root+}pymongo/ database.html#pymongo.database.Database.cursor_command>`__
0 commit comments