summaryrefslogtreecommitdiff
path: root/src/mongo/bson/bsonobj.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/bson/bsonobj.h')
-rw-r--r--src/mongo/bson/bsonobj.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/bson/bsonobj.h b/src/mongo/bson/bsonobj.h
index 336d84eb022..69e85b2117d 100644
--- a/src/mongo/bson/bsonobj.h
+++ b/src/mongo/bson/bsonobj.h
@@ -502,6 +502,10 @@ public:
return *p == EOO ? "" : p + 1;
}
+ StringData firstElementFieldNameStringData() const {
+ return StringData(firstElementFieldName());
+ }
+
BSONType firstElementType() const {
const char* p = objdata() + 4;
return (BSONType)*p;