Learn R Programming

rmongodb (version 1.8.0)

mongo.oid.create: Create a mongo.oid object

Description

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

Usage

mongo.oid.create()

Arguments

Value

A mongo.oid object that is reasonably assured of being unique.

Details

See http://www.mongodb.org/display/DOCS/Object+IDs

See Also

mongo.oid, mongo.oid.from.string, as.character.mongo.oid, mongo.oid.to.string, mongo.bson.buffer.append, mongo.bson.buffer.append.oid, mongo.bson.buffer.append.list, mongo.bson.buffer, mongo.bson.

Examples

Run this code
buf <- mongo.bson.buffer.create()
oid <- mongo.oid.create()
mongo.bson.buffer.append(buf, "_id", oid)
b <- mongo.bson.from.buffer(buf)

Run the code above in your browser using DataLab