getDatabase

fun getDatabase(databaseName: String): MongoDatabase

Gets a MongoDatabase instance for the given database name.

Return

a MongoDatabase representing the specified database

Parameters

databaseName

the name of the database to retrievecom.mongodb.connection.

See also

MongoNamespace.checkDatabaseNameValidity

Throws

if databaseName is invalid