Skip to content

Commit 955d305

Browse files
committed
JS PR fixes 1
1 parent c90decc commit 955d305

File tree

1 file changed

+14
-20
lines changed

1 file changed

+14
-20
lines changed

source/write/run-command.txt

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ parameters in a command document, then pass the command document to the
4747
``command()`` method. This method returns a ``Cursor`` object.
4848

4949
The following code shows how you can use the ``command()``
50-
method to run the ``hello`` command, which returns information about
51-
the current member's role in the replica set, on a database:
50+
method on a database to run the ``hello`` command, which returns
51+
information about the current member's role in the replica set:
5252

5353
.. code-block:: php
5454

55-
$result = $database->command(['ping' => 1]);
55+
$result = $database->command(['hello' => 1]);
5656

5757
To find a link to a full list of database commands and corresponding
5858
parameters, see the :ref:`Additional Information section
@@ -77,7 +77,7 @@ parameters, see the :ref:`Additional Information section
7777
);
7878

7979
For more information on read preference options, see :manual:`Read
80-
Preference </core/read-preference/>` in the Server manual.
80+
Preference </core/read-preference/>` in the {+mdb-server+} manual.
8181

8282
.. _php-command-response:
8383

@@ -109,12 +109,9 @@ response contains a document with the following fields:
109109

110110
* - ``operationTime``
111111
- The logical time of the operation. MongoDB uses the
112-
logical time to order operations.
113-
114-
.. seealso::
115-
116-
To learn more about logical time, see our blog post about the
117-
:website:`Global Logical Clock </blog/post/transactions-background-part-4-the-global-logical-clock>`.
112+
logical time to order operations. To learn more about this
113+
concept, see our blog post about the :website:`Global Logical
114+
Clock </blog/post/transactions-background-part-4-the-global-logical-clock>`.
118115

119116
* - ``$clusterTime``
120117
- A document that contains the signed cluster time. Cluster time is a
@@ -126,26 +123,22 @@ response contains a document with the following fields:
126123
- ``signature``, a document that contains the hash of the cluster time and the ID
127124
of the key used to sign the cluster time
128125

129-
.. _rust-command-example:
126+
.. _php-command-example:
130127

131128
Command Example
132129
---------------
133130

134-
The following code shows how you can use the ``command()`` method to run
135-
the ``explain`` command for a ``count`` operation on the ``flowers``
136-
collection of the ``plants`` database. The ``explain`` command runs in the
137-
``"queryPlanner"`` verbosity mode:
131+
The following example uses the ``command()`` method to run
132+
the ``explain`` command for a ``count`` operation. The ``explain``
133+
command runs in the ``queryPlanner`` verbosity mode:
138134

139135
.. literalinclude:: /includes/write/run-command.php
140136
:language: php
141137
:dedent:
142138
:start-after: start-runcommand
143139
:end-before: end-runcommand
144140

145-
Output
146-
~~~~~~
147-
148-
The output includes fields explaining the
141+
The output of this command includes fields explaining the
149142
execution of the ``count`` operation, such as the winning plan, which is
150143
the plan selected by the query optimizer, and any rejected
151144
plans. The output also contains information about the execution of the
@@ -169,7 +162,7 @@ Additional Information
169162
----------------------
170163

171164
For more information about the concepts in this guide, see the following
172-
documentation in the Server manual:
165+
documentation in the {+mdb-server+} manual:
173166

174167
- :manual:`db.runCommand() </reference/method/db.runCommand/>`
175168
- :manual:`Database Commands </reference/command/>`
@@ -180,3 +173,4 @@ API Documentation
180173
~~~~~~~~~~~~~~~~~
181174

182175
- `MongoDB\\Database::command() <{+api+}/method/MongoDBDatabase-command/>`__
176+
- `ReadPreference <https://www.php.net/manual/en/class.mongodb-driver-readpreference.php>`__

0 commit comments

Comments
 (0)