|
| BSONObjBuilder (int initsize=512) |
|
| BSONObjBuilder (BufBuilder &baseBuilder) |
|
BSONObjBuilder & | appendElements (BSONObj x) |
| add all the fields from the object specified to this object
|
|
BSONObjBuilder & | appendElementsUnique (BSONObj x) |
| add all the fields from the object specified to this object if they don't exist already
|
|
BSONObjBuilder & | append (const BSONElement &e) |
| append element to the object we are building
|
|
BSONObjBuilder & | appendAs (const BSONElement &e, const StringData &fieldName) |
| append an element but with a new name
|
|
BSONObjBuilder & | append (const StringData &fieldName, BSONObj subObj) |
| add a subobject as a member
|
|
BSONObjBuilder & | appendObject (const StringData &fieldName, const char *objdata, int size=0) |
| add a subobject as a member
|
|
BufBuilder & | subobjStart (const StringData &fieldName) |
| add header for a new subobject and return bufbuilder for writing to the subobject's body More...
|
|
BSONObjBuilder & | appendArray (const StringData &fieldName, const BSONObj &subObj) |
| add a subobject as a member with type Array. More...
|
|
BufBuilder & | subarrayStart (const StringData &fieldName) |
| add header for a new subarray and return bufbuilder for writing to the subarray's body
|
|
BSONObjBuilder & | appendBool (const StringData &fieldName, int val) |
| Append a boolean element.
|
|
BSONObjBuilder & | append (const StringData &fieldName, bool val) |
| Append a boolean element.
|
|
BSONObjBuilder & | append (const StringData &fieldName, int n) |
| Append a 32 bit integer element.
|
|
BSONObjBuilder & | append (const StringData &fieldName, unsigned n) |
| Append a 32 bit unsigned element - cast to a signed int. More...
|
|
BSONObjBuilder & | append (const StringData &fieldName, long long n) |
| Append a NumberLong.
|
|
BSONObjBuilder & | appendIntOrLL (const StringData &fieldName, long long n) |
| appends a number. More...
|
|
BSONObjBuilder & | appendNumber (const StringData &fieldName, int n) |
| appendNumber is a series of method for appending the smallest sensible type mostly for JS
|
|
BSONObjBuilder & | append (const StringData &fieldName, double n) |
| Append a double element.
|
|
bool | appendAsNumber (const StringData &fieldName, const std::string &data) |
| tries to append the data as a number More...
|
|
BSONObjBuilder & | appendOID (const StringData &fieldName, OID *oid=0, bool generateIfBlank=false) |
| Append a BSON Object ID (OID type). More...
|
|
BSONObjBuilder & | append (const StringData &fieldName, OID oid) |
| Append a BSON Object ID. More...
|
|
BSONObjBuilder & | genOID () |
| Generate and assign an object id for the _id field. More...
|
|
BSONObjBuilder & | appendTimeT (const StringData &fieldName, time_t dt) |
| Append a time_t date. More...
|
|
BSONObjBuilder & | appendDate (const StringData &fieldName, Date_t dt) |
| Append a date. More...
|
|
BSONObjBuilder & | appendRegex (const StringData &fieldName, const StringData ®ex, const StringData &options="") |
| Append a regular expression value. More...
|
|
BSONObjBuilder & | append (const StringData &fieldName, const char *str, int sz) |
| Append a string element. More...
|
|
BSONObjBuilder & | append (const StringData &fieldName, const char *str) |
| Append a string element.
|
|
BSONObjBuilder & | append (const StringData &fieldName, const std::string &str) |
| Append a string element.
|
|
BSONObjBuilder & | append (const StringData &fieldName, const StringData &str) |
| Append a string element.
|
|
void | appendNull () |
| Implements builder interface but no-op in ObjBuilder.
|
|
BSONObjBuilder & | appendNull (const StringData &fieldName) |
| Append a Null element to the object.
|
|
BSONObjBuilder & | appendTimestamp (const StringData &fieldName, const Timestamp_t &ts=Timestamp_t()) |
| Append a Timestamp element to the object.
|
|
BSONObjBuilder & | appendBinData (const StringData &fieldName, int len, BinDataType type, const void *data) |
| Append a binary data element. More...
|
|
BSONObjBuilder & | appendBinDataArrayDeprecated (const char *fieldName, const void *data, int len) |
| Subtype 2 is deprecated. More...
|
|
BSONObjBuilder & | appendCodeWScope (const StringData &fieldName, const StringData &code, const BSONObj &scope) |
| Append to the BSON object a field of type CodeWScope. More...
|
|
void | appendMinForType (const StringData &fieldName, int type) |
| these are the min/max when comparing, not strict min/max elements for a given type
|
|
template<class T > |
BSONObjBuilder & | append (const StringData &fieldName, const std::vector< T > &vals) |
| Append an array of values. More...
|
|
template<class T > |
BSONObjBuilder & | append (const StringData &fieldName, const std::set< T > &vals) |
| Append a set of values. More...
|
|
template<class K , class T > |
BSONObjBuilder & | append (const StringData &fieldName, const std::map< K, T > &vals) |
| Append a map of values as a sub-object. More...
|
|
BSONObj | obj () |
| destructive The returned BSONObj will free the buffer when it is finished. More...
|
|
BSONObj | done () |
| Fetch the object we have built. More...
|
|
BSONObj | asTempObj () |
| Peek at what is in the builder, but leave the builder ready for more appends. More...
|
|
void | abandon () |
| Make it look as if "done" has been called, so that our destructor is a no-op. More...
|
|
BSONObjBuilderValueStream & | operator<< (const StringData &name) |
| Stream oriented way to add field names and values. More...
|
|
BSONObjBuilder & | operator<< (GENOIDLabeler) |
| Stream oriented way to add field names and values. More...
|
|
bool | owned () const |
|
Utility for creating a BSONObj.
See also the BSON() and BSON_ARRAY() macros.