Description Details See Also Examples
Objects of class "mongo.bson.buffer" are used to build BSON documents (mongo.bson objects).
There are many functions for appending data into a mongo.bson.buffer
object.
See mongo.bson.buffer.append()
for a list of those
functions.
After constructing your object in the buffer,
mongo.bson.from.buffer()
may be used to turn the buffer into a
mongo.bson object.
mongo.bson.buffer objects have "mongo.bson.buffer" as their class and contain an externally managed pointer to the actual document data buffer. This pointer is stored in the "mongo.bson.buffer" attribute of the object.
mongo.bson,
mongo.bson.buffer.size
,
mongo.bson.from.buffer
,
mongo.bson.buffer.append
,
mongo.bson.buffer.start.object
,
mongo.bson.buffer.start.array
,
mongo.bson.buffer.finish.object
.
1 2 3 4 5 | buf <- mongo.bson.buffer.create()
mongo.bson.buffer.append(buf, "make", "Ford")
mongo.bson.buffer.append(buf, "model", "Mustang")
mongo.bson.buffer.append.int(buf, "year", 1968)
b <- mongo.bson.from.buffer(buf)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.