mongo.undefined.create: Create a mongo.undefined object

Description Usage Value See Also Examples

View source: R/bson.R

Description

Create a mongo.undefined object for appending to a buffer with
mongo.bson.buffer.append() or for embedding in a list such that mongo.bson.buffer.append.list() will properly insert an undefined value into the mongo.bson.buffer object.

Usage

1

Value

a mongo.undefined object

See Also

mongo.undefined,
mongo.bson.buffer.append,
mongo.bson.buffer.append.list,
mongo.bson.buffer,
mongo.bson.

Examples

1
2
3
4
5
6
7
8
9
buf <- mongo.bson.buffer.create()
undef <- mongo.undefined.create()
mongo.bson.buffer.append(buf, "Undef", undef)
l <- list(u1 = undef, One = 1)
mongo.bson.buffer.append.list(buf, "listWundef", l)
b <- mongo.bson.from.buffer(buf)

# the above will create a mongo.bson object of the following form:
# { "Undef": UNDEFINED, "listWundef" : { "u1" : UNDEFINED, "One" : 1 } }

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