mongo.bson.empty: Create an empty mongo.bson object

Description Usage Value See Also Examples

View source: R/bson.R

Description

Returns an empty mongo.bson object. mongo.bson objects have "mongo.bson" as their class and contain an externally managed pointer to the actual data. This pointer is stored in the "mongo.bson" attribute of the object.

Usage

1

Value

An empty mongo.bson object

See Also

mongo.bson

Examples

1
2
3
4
5
6
7
# Use an empty mongo.bson for the query object which matches everything.
# This happens to be the default value for the query
# parameter to mongo.count,  but we explicity use mongo.bson.empty()
# here for an example.
mongo <- mongo.create()
if (mongo.is.connected(mongo))
    print(mongo.count(mongo, "test.people", query=mongo.bson.empty()))

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