summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-09-29 10:14:54 -0400
committerEliot Horowitz <eliot@10gen.com>2009-09-29 10:14:54 -0400
commit9641489751689f6dd58637fe8e00075ff7f2ecea (patch)
treefcc6dcc825eb7873abc7623229e2ee7aeb180a54
parentbda5802b46f286abac87a3341d1d1ef5d91aa412 (diff)
downloadmongo-9641489751689f6dd58637fe8e00075ff7f2ecea.tar.gz
append( string, BSONObj ) since often used for array building
-rw-r--r--db/jsobj.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/db/jsobj.h b/db/jsobj.h
index 421a1aa2886..b8745c72487 100644
--- a/db/jsobj.h
+++ b/db/jsobj.h
@@ -1093,6 +1093,10 @@ namespace mongo {
b.append((void *) subObj.objdata(), subObj.objsize());
}
+ void append(const string& fieldName , BSONObj subObj) {
+ append( fieldName.c_str() , subObj );
+ }
+
/** add header for a new subobject and return bufbuilder for writing to
the subobject's body */
BufBuilder &subobjStart(const char *fieldName) {