mongo.disconnect: Disconnect from a MongoDB server

Description Usage Arguments Value See Also Examples

View source: R/mongo.R

Description

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.

Usage

1

Arguments

mongo

(mongo) a mongo connection object.

Value

The mongo object is returned.

See Also

mongo,
mongo.create,
mongo.reconnect,
mongo.is.connected.

Examples

1
2
3
4
5
mongo <- mongo.create()
if (mongo.is.connected(mongo)) {
    n_people <- mongo.count(mongo, "test.people")
    mongo.disconnect(mongo)
}

jonkatz2/rmongodb documentation built on May 19, 2019, 7:30 p.m.