Skip to content

Commit 615cee4

Browse files
committed
code egs
1 parent 2a498b5 commit 615cee4

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

source/includes/run-command.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@ fun main() {
1616

1717
val commandResult = database.runCommand(command, readPreference)
1818
//end-read-preference
19+
20+
//start-build-info
21+
println( db.runCommand( { buildInfo: 1 } ) );
22+
//end-build-info
1923
}

source/run-command.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ For more information on read preference options, see :manual:`Read Preference
7272

7373
.. note::
7474

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

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

125125
.. io-code-block::
126126

127-
.. input::
127+
.. input:: /includes/run-command.kt
128+
:start-after: start-build-info
129+
:end-before: end-build-info
128130
:language: kotlin
129-
130-
db.runCommand( { buildInfo: 1 } );
131+
:dedent:
131132

132133
.. output::
133134
:visible: false

0 commit comments

Comments
 (0)