Learn R Programming

rmongodb (version 1.8.0)

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

Description

Append a regular expression value into a mongo.bson.buffer.

Usage

mongo.bson.buffer.append.regex(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
(mongo.regex) A regular expression as created by mongo.regex.create().

Value

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

See Also

mongo.regex.create, mongo.bson.buffer.append.regex, mongo.bson.buffer.append, mongo.bson, mongo.bson.buffer.

Examples

Run this code
buf <- mongo.bson.buffer.create()
regex <- mongo.regex.create("acme.*corp", options="i")
mongo.bson.buffer.append.regex(buf, "MatchAcme", regex)
b <- mongo.bson.from.buffer(buf)

Run the code above in your browser using DataLab