Description Usage Arguments Value See Also Examples
Disconnect from a MongoDB server. No further communication is possible on
the connection. However, mongo.reconnect()
may be called on
the mongo object to restablish the connection.
1 |
mongo |
(mongo) a mongo connection object. |
The mongo object is returned.
mongo,
mongo.create
,
mongo.reconnect
,
mongo.is.connected
.
1 2 3 4 5 | mongo <- mongo.create()
if (mongo.is.connected(mongo)) {
n_people <- mongo.count(mongo, "test.people")
mongo.disconnect(mongo)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.