Learn R Programming

rmongodb (version 1.8.0)

mongo.bson.buffer.append.timestamp: Append a timestamp value into a mongo.bson.buffer

Description

Append a timestamp value into a mongo.bson.buffer.

Usage

mongo.bson.buffer.append.timestamp(buf, name, value)

Arguments

buf
(mongo.bson.buffer) The buffer object to which to append.
name
(string) The name (key) of the field appended to the buffer.
value
A (mongo.timestamp) value as created by mongo.timestamp.create().

Value

TRUE if successful; otherwise, FALSE if an error occured appending the data.

Details

mongo.timestamp objects extend the "POSIXct" class to include an attrubute "increment".

See mongo.bson.buffer.append.time().

See Also

mongo.timestamp.create, mongo.bson.buffer.append.time, mongo.bson.buffer.append, mongo.bson, mongo.bson.buffer.

Examples

Run this code
buf <- mongo.bson.buffer.create()
mongo.bson.buffer.append.timestamp(buf, "Now-27",
    mongo.timestamp.create(Sys.time(), 27))
b <- mongo.bson.from.buffer(buf)

Run the code above in your browser using DataLab