Skip to content

Commit cdd710f

Browse files
committed
MM feedback
1 parent 59d5577 commit cdd710f

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

source/includes/run-command.kt

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,18 @@ import org.bson.Document
33

44
fun main() {
55
//start-execute
6-
val explanation = database.runCommand({
7-
explain: {
8-
find: 'restaurants'
9-
}
10-
})
6+
val commandToExplain = Document( "find", "restaurants")
7+
val explanation = database.runCommand(Document("explain", commandToExplain))
118
//end-execute
129

1310
//start-read-preference
14-
val command = { "hello": 1 }
15-
val commandReadPreference = { readPreference: "secondary" }
11+
val command = Document("hello", 1)
12+
val commandReadPreference = Document( "readPreference", "secondary" )
1613

17-
val commandResult = database.runCommand(command, readPreference)
14+
val commandResult = database.runCommand(command, commandReadPreference)
1815
//end-read-preference
1916

2017
//start-build-info
21-
println( database.runCommand( { buildInfo: 1 } ) );
18+
println( database.runCommand( Document( "buildInfo", 1 ) );
2219
//end-build-info
2320
}

0 commit comments

Comments
 (0)