public interface MongoDB
Modifier and Type | Method and Description |
---|---|
com.mongodb.DB |
getDefaultMongoDb()
Obtain a shared instance of the MongoDB database connection object connected
to the default database
|
com.mongodb.DB |
getMongoDb(String dbname)
Obtain a shared instance of the MongoDB database connection object for the
specific database
|
com.mongodb.DB getDefaultMongoDb()
DB
connection objectcom.mongodb.DB getMongoDb(String dbname)
dbname
- the database name to connect toDB
connection object5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.