Class MongoClient
Represents a connection to a MongoDB server.
class MongoClient
;
Note that this class uses a ConnectionPool internally to create and reuse network conections to the server as necessary. It should be reused for all fibers in a thread for optimum performance in high concurrency scenarios.
Methods
Name | Description |
---|---|
cleanupConnections
()
|
Disconnects all currently unused connections to the server. |
getCollection
(path)
|
Accesses a collection using an absolute path. |
getDatabase
(dbName)
|
Returns an object representing the specified database. |
getDatabases
()
|
Return a handle to all databases of the server. |