Skip to content

Commit bef2891

Browse files
ianf-mongodbjeff-allen-mongo
authored andcommitted
DOCSP-19047 Add generic message command syntax example
1 parent 73f2120 commit bef2891

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

source/reference/command.txt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,22 @@ To run an administrative command against the ``admin`` database, use :method:`db
2929

3030
db.adminCommand( { <command> } )
3131

32-
.. include:: /includes/extracts/commands-toc-explanation.rst
32+
.. note::
33+
34+
For details on specific commands, including syntax and examples,
35+
click on the specific command to go to its reference page.
36+
37+
Command Syntax
38+
--------------
39+
40+
When you run a database command, you specify the command as a document
41+
to :method:`db.runCommand()`. The document's key is the command to run,
42+
and the value is typically supplied as ``1``. The value does not affect
43+
the output of the command for example:
44+
45+
.. code-block:: javascript
46+
47+
db.runCommand( { hello: 1 } )
3348

3449
User Commands
3550
-------------

0 commit comments

Comments
 (0)