Skip to content

DOCSP-19047 Add generic message command syntax example #6002

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
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