Skip to content

Commit

Permalink
code egs
Browse files Browse the repository at this point in the history
  • Loading branch information
rachel-mack committed Jan 27, 2025
1 parent 2a498b5 commit 615cee4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions source/includes/run-command.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@ fun main() {

val commandResult = database.runCommand(command, readPreference)
//end-read-preference

//start-build-info
println( db.runCommand( { buildInfo: 1 } ) );
//end-build-info
}
9 changes: 5 additions & 4 deletions source/run-command.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ For more information on read preference options, see :manual:`Read Preference

.. note::

The ``command()`` method ignores the read preference setting you may have set
The ``runCommand()`` method ignores the read preference setting you may have set
on your ``database`` object. If no read preference is specified, this method
uses the ``primary`` read preference.

Expand Down Expand Up @@ -124,10 +124,11 @@ The following code shows the general output format of the ``buildInfo`` command:

.. io-code-block::

.. input::
.. input:: /includes/run-command.kt
:start-after: start-build-info
:end-before: end-build-info
:language: kotlin

db.runCommand( { buildInfo: 1 } );
:dedent:

.. output::
:visible: false
Expand Down

0 comments on commit 615cee4

Please sign in to comment.