Skip to content

Commit 9596efb

Browse files
committed
DOCSP-19047 Add generic message command syntax example
1 parent 311b1ff commit 9596efb

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

source/reference/command.txt

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,30 @@ To run a command against the current database, use :method:`db.runCommand()`:
2121

2222
.. code-block:: javascript
2323

24-
db.runCommand( { <command> } )
24+
db.runCommand( { <command> } );
2525

2626
To run an administrative command against the ``admin`` database, use :method:`db.adminCommand()`:
2727

2828
.. code-block:: javascript
2929

30-
db.adminCommand( { <command> } )
30+
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)