Skip to content

putting form before fields - part 1 #1368

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
18 changes: 8 additions & 10 deletions source/reference/command/applyOps.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ Definition
instance. The :dbcommand:`applyOps` command is primarily an internal
command to support :term:`sharded clusters <sharded cluster>`.

The :dbcommand:`applyOps` command has the following prototype form:

.. code-block:: javascript

db.runCommand( { applyOps: [ <operations> ],
preCondition: [ { ns: <namespace>, q: <query>, res: <result> } ] } )

The :dbcommand:`applyOps` command takes a document with the following fields:

.. include:: /reference/command/applyOps-field.rst
Expand All @@ -21,16 +28,7 @@ Definition

.. include:: /reference/command/applyOps-preCondition-field.rst

Example
-------

The :dbcommand:`applyOps` command has the following prototype form:

.. code-block:: javascript

db.runCommand( { applyOps: [ <operations> ], preCondition: [ { ns: <namespace>, q: <query>, res: <result> } ] } )

.. include:: /includes/warning-blocking-global.rst
.. include:: /includes/warning-blocking-global.rst

.. write-lock

Expand Down
6 changes: 4 additions & 2 deletions source/reference/command/cleanupOrphaned.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ Definition
Orphaned data sometimes results from aborted migrations due to
network latency and power loss.

.. include:: /reference/command/cleanupOrphaned-field.rst

Run :dbcommand:`cleanupOrphaned` directly on the :program:`mongod`
instance on the primary replica set member of the shard. Do not
run :dbcommand:`cleanupOrphaned` from a :program:`mongos` instance.
Expand All @@ -36,6 +34,10 @@ Definition
"secondaryThrottle": true
}

:dbcommand:`cleanupOrphaned` has the following fields:

.. include:: /reference/command/cleanupOrphaned-field.rst

Required Access
---------------

Expand Down
11 changes: 6 additions & 5 deletions source/reference/command/copydb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ copydb

.. dbcommand:: copydb

The :dbcommand:`copydb` command copies a database from a remote
host to the current host. :dbcommand:`copydb` accepts the following
options:

.. include:: /reference/command/copydb-fields.rst
Copies a database from a remote
host to the current host.

:dbcommand:`copydb` has the following syntax:

Expand All @@ -25,6 +22,10 @@ copydb
nonce: <nonce>,
key: <key> }

:dbcommand:`copydb` accepts the following options:

.. include:: /reference/command/copydb-fields.rst

Behavior
--------

Expand Down
8 changes: 5 additions & 3 deletions source/reference/command/getLastError.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ Definition
connection*. Clients typically use :dbcommand:`.getLastError` in
combination with write operations to ensure that the write succeeds.

.. include:: /reference/command/getLastError-fields.rst

The following is the prototype form:
:dbcommand:`getLastError` uses the following prototype form:

.. code-block:: javascript

{ getLastError: 1 }

:dbcommand:`getLastError` uses the following fields:

.. include:: /reference/command/getLastError-fields.rst

.. seealso:: :doc:`Write Concern </core/write-concern>`,
:doc:`/reference/write-concern`, and :ref:`replica-set-write-concern`.

Expand Down
6 changes: 6 additions & 0 deletions source/reference/command/hashBSONElement.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ Description
:dbcommand:`_hashBSONElement` command returns 8 bytes from the 16
byte MD5 hash.

The :dbcommand:`_hashBSONElement` command has the following form:

.. code-block:: javascript

db.runCommand({ _hashBSONElement: <key> , seed: <seed> })

The :dbcommand:`_hashBSONElement` command has the following fields:

.. include:: /reference/command/hashBSONElement-field.rst
Expand Down
14 changes: 7 additions & 7 deletions source/reference/command/sleep.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ Definition
Forces the database to block all operations. This is an internal
command for testing purposes.

The :dbcommand:`sleep` command has the following options:
The :dbcommand:`sleep` command takes the following prototype form:

.. include:: /reference/command/sleep-field.rst
.. code-block:: javascript

Example
-------
{ sleep: 1, w: <true|false>, secs: <seconds> }

The :dbcommand:`sleep` command takes the following prototype form:
The :dbcommand:`sleep` command has the following fields:

.. code-block:: javascript
.. include:: /reference/command/sleep-field.rst

{ sleep: 1, w: <true|false>, secs: <seconds> }
Behavior
--------

The command places the :program:`mongod` instance in a :term:`write lock`
state for a specified number of seconds. Without arguments,
Expand Down
7 changes: 7 additions & 0 deletions source/reference/command/split.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ Definition
information on these circumstances, and on the MongoDB shell commands
that wrap :dbcommand:`split`.

The :dbcommand:`split` command uses the following form:

.. code-block:: javascript

db.adminCommand( { split: <database>.<collection>,
<find|middle|bounds> } )

The :dbcommand:`split` command takes a document with the following
fields:

Expand Down