Skip to content

Commit

Permalink
DOCSP-19047 Add generic message command syntax example
Browse files Browse the repository at this point in the history
  • Loading branch information
ianf-mongodb authored and jeff-allen-mongo committed Oct 15, 2021
1 parent 311b1ff commit 10be055
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion source/reference/command.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,22 @@ To run an administrative command against the ``admin`` database, use :method:`db

db.adminCommand( { <command> } )

.. include:: /includes/extracts/commands-toc-explanation.rst
.. note::

For details on specific commands, including syntax and examples,
click on the specific command to go to its reference page.

Command Syntax
--------------

When you run a database command, you specify the command as a document
to :method:`db.runCommand()`. The document's key is the command to run,
and the value is typically supplied as ``1``. The value does not affect
the output of the command for example:

.. code-block:: javascript

db.runCommand( { hello: 1 } )

User Commands
-------------
Expand Down

0 comments on commit 10be055

Please sign in to comment.