Description Usage Arguments Details Value See Also Examples
BSON documents may themselves contain nested documents. Call this function to finish a subobject within a mongo.bson.buffer.
1 |
buf |
(mongo.bson.buffer) The buffer object on which to finish a subobject. |
mongo.bson.buffer.start.object()
and
mongo.bson.buffer.finish.object()
may be called in a stackwise (LIFO)
order to further nest documents.
This function must also be called to finish arrays.
TRUE if successful; otherwise, FALSE if an error occured appending the data.
mongo.bson,
mongo.bson.buffer,
mongo.bson.buffer.start.object
,
mongo.bson.buffer.start.array
,
mongo.bson.buffer.append
.
1 2 3 4 5 6 7 8 9 10 | buf <- mongo.bson.buffer.create()
mongo.bson.buffer.start.object(buf, "name")
mongo.bson.buffer.append(buf, "first", "Jeff")
mongo.bson.buffer.append(buf, "last", "Davis")
mongo.bson.buffer.finish.object(buf)
mongo.bson.buffer.append(buf, "city", "Toronto")
b <- mongo.bson.from.buffer(buf)
# the above produces a BSON object of the form:
# { "name" : { "first" : "Jeff", "last" : "Davis" }, "city" : "Toronto" }
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.