File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -3,21 +3,18 @@ import org.bson.Document
3
3
4
4
fun main () {
5
5
// 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))
11
8
// end-execute
12
9
13
10
// 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" )
16
13
17
- val commandResult = database.runCommand(command, readPreference )
14
+ val commandResult = database.runCommand(command, commandReadPreference )
18
15
// end-read-preference
19
16
20
17
// start-build-info
21
- println ( database.runCommand( { buildInfo: 1 } ) );
18
+ println ( database.runCommand( Document ( " buildInfo" , 1 ) );
22
19
// end-build-info
23
20
}
You can’t perform that action at this time.
0 commit comments