|
| BSONObjBuilder (int initsize=512) |
|
| BSONObjBuilder (BufBuilder &baseBuilder) |
|
| BSONObjBuilder (const BSONSizeTracker &tracker) |
|
void | reset () |
|
bool | isEmpty () const |
|
BSONObjBuilder & | appendElements (BSONObj x) |
| add all the fields from the object specified to this object
|
|
BSONObjBuilder & | appendElementsWithoutName (BSONObj x) |
|
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
|
|
BSONObjBuilder & | appendArray (const StringData &fieldName, const BSONObj &subObj) |
| add a subobject as a member with type Array.
|
|
BSONObjBuilder & | append (const StringData &fieldName, BSONArray arr) |
|
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.
|
|
BSONObjBuilder & | append (const StringData &fieldName, long long n) |
| Append a NumberLong.
|
|
BSONObjBuilder & | appendIntOrLL (const StringData &fieldName, long long n) |
| appends a number.
|
|
BSONObjBuilder & | appendNumber (const StringData &fieldName, int n) |
| appendNumber is a series of method for appending the smallest sensible type.
|
|
BSONObjBuilder & | appendNumber (const StringData &fieldName, double d) |
|
BSONObjBuilder & | appendNumber (const StringData &fieldName, size_t n) |
|
BSONObjBuilder & | appendNumber (const StringData &fieldName, long long l) |
|
BSONObjBuilder & | append (const StringData &fieldName, double n) |
| Append a double element.
|
|
BSONObjBuilder & | append (const StringData &fieldName, const bsonDecimal &decimal) |
|
bool | appendDecimal (const StringData &fieldName, const StringData &strDecimal, int precision, int scale) |
|
bool | appendDecimal (const StringData &fieldName, const StringData &strDecimal) |
|
bool | appendAsNumber (const StringData &fieldName, const StringData &data) |
| tries to append the data as a number
|
|
BSONObjBuilder & | appendOID (const StringData &fieldName, OID *oid=0, bool generateIfBlank=false) |
| Append a BSON Object ID (OID type).
|
|
BSONObjBuilder & | append (const StringData &fieldName, OID oid) |
| Append a BSON Object ID.
|
|
BSONObjBuilder & | genOID () |
| Generate and assign an object id for the _id field.
|
|
BSONObjBuilder & | appendTimeT (const StringData &fieldName, time_t dt) |
| Append a time_t date.
|
|
BSONObjBuilder & | appendDate (const StringData &fieldName, Date_t dt) |
| Append a date.
|
|
BSONObjBuilder & | append (const StringData &fieldName, Date_t dt) |
|
BSONObjBuilder & | appendRegex (const StringData &fieldName, const StringData ®ex, const StringData &options="") |
| Append a regular expression value.
|
|
BSONObjBuilder & | appendCode (const StringData &fieldName, const StringData &code) |
|
BSONObjBuilder & | append (const StringData &fieldName, const char *str, int sz) |
| Append a string element.
|
|
BSONObjBuilder & | appendStrWithNoTerminating (const StringData &fieldName, const char *str, int sz) |
| Append a string element.
|
|
BSONObjBuilder & | append (const StringData &fieldName, const char *str) |
| Append a string element.
|
|
BSONObjBuilder & | append (const StringData &fieldName, const string &str) |
| Append a string element.
|
|
BSONObjBuilder & | append (const StringData &fieldName, const StringData &str) |
| Append a string element.
|
|
BSONObjBuilder & | appendSymbol (const StringData &fieldName, const StringData &symbol) |
|
BSONObjBuilder & | appendNull (const StringData &fieldName) |
| Append a Null element to the object.
|
|
BSONObjBuilder & | appendMinKey (const StringData &fieldName) |
|
BSONObjBuilder & | appendUndefined (const StringData &fieldName) |
| Append a Undefined element to the object.
|
|
BSONObjBuilder & | appendMaxKey (const StringData &fieldName) |
|
BSONObjBuilder & | appendTimestamp (const StringData &fieldName) |
|
BSONObjBuilder & | appendTimestamp (const StringData &fieldName, long long val) |
| Alternative way to store an OpTime in BSON.
|
|
BSONObjBuilder & | appendTimestamp (const StringData &fieldName, long long time, unsigned int inc) |
| Append a timestamp value to a bson.
|
|
BSONObjBuilder & | appendDBRef (const StringData &fieldName, const StringData &ns, const OID &oid) |
|
BSONObjBuilder & | appendBinData (const StringData &fieldName, int len, BinDataType type, const char *data) |
| Append a binary data element.
|
|
BSONObjBuilder & | appendBinData (const StringData &fieldName, int len, BinDataType type, const unsigned char *data) |
|
BSONObjBuilder & | appendBinDataArrayDeprecated (const char *fieldName, const char *data, int len) |
| Subtype 2 is deprecated.
|
|
BSONObjBuilder & | appendCodeWScope (const StringData &fieldName, const StringData &code, const BSONObj &scope) |
| Append to the BSON object a field of type CodeWScope.
|
|
void | appendWhere (const StringData &code, const BSONObj &scope) |
|
void | appendMinForType (const StringData &fieldName, int type) |
| these are the min/max when comparing, not strict min/max elements for a given type
|
|
void | appendMaxForType (const StringData &fieldName, int type) |
|
template<class T > |
BSONObjBuilder & | append (const StringData &fieldName, const vector< T > &vals) |
| Append an array of values.
|
|
template<class T > |
BSONObjBuilder & | append (const StringData &fieldName, const list< T > &vals) |
|
template<class T > |
BSONObjBuilder & | append (const StringData &fieldName, const set< T > &vals) |
| Append a set of values.
|
|
BSONObj | obj () |
| destructive The returned BSONObj will free the buffer when it is finished.
|
|
BSONObj | done () |
| Fetch the object we have built.
|
|
void | doneFast () |
|
BSONObj | asTempObj () |
| Peek at what is in the builder, but leave the builder ready for more appends.
|
|
char * | decouple (int &l) |
|
void | decouple () |
|
void | appendKeys (const BSONObj &keyPattern, const BSONObj &values) |
|
BSONObjBuilderValueStream & | operator<< (const char *name) |
| Stream oriented way to add field names and values.
|
|
BSONObjBuilder & | operator<< (GENOIDLabeler) |
| Stream oriented way to add field names and values.
|
|
BSONObjBuilderValueStream & | operator<< (const ForceExplicitString &name) |
| Stream oriented way to add field names and values.
|
|
Labeler | operator<< (const Labeler::Label &l) |
|
template<typename T > |
BSONObjBuilderValueStream & | operator<< (const BSONField< T > &f) |
|
template<typename T > |
BSONObjBuilder & | operator<< (const BSONFieldValue< T > &v) |
|
bool | owned () const |
|
BSONObjIterator | iterator () const |
|
bool | hasField (const StringData &name) const |
|
int | len () const |
|
BufBuilder & | bb () |
|