diff options
author | Greg Studer <greg@10gen.com> | 2013-11-01 10:35:06 -0400 |
---|---|---|
committer | Greg Studer <greg@10gen.com> | 2013-11-04 10:16:27 -0500 |
commit | 67bd639528d6d81c0a425c1889147fc25f97915e (patch) | |
tree | 844c5d6fcc9d4713f82271e1c0a93884c1a092ab /src/mongo/db/field_parser.h | |
parent | 4c900822abedd44779eaf2e9b8679690e69f9750 (diff) | |
download | mongo-67bd639528d6d81c0a425c1889147fc25f97915e.tar.gz |
SERVER-10519 aggregate upsert and n stats in mongos
Diffstat (limited to 'src/mongo/db/field_parser.h')
-rw-r--r-- | src/mongo/db/field_parser.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/field_parser.h b/src/mongo/db/field_parser.h index d814a3cbcd9..36a8776f529 100644 --- a/src/mongo/db/field_parser.h +++ b/src/mongo/db/field_parser.h @@ -122,6 +122,15 @@ namespace mongo { string* errMsg = NULL); /** + * Extracts a document id from a particular field name, which may be of any type but Array. + * Wraps the extracted id value in a BSONObj with one element and empty field name. + */ + static FieldState extractID( BSONObj doc, + const BSONField<BSONObj>& field, + BSONObj* out, + string* errMsg = NULL ); + + /** * Extracts a mandatory BSONSerializable structure 'field' from the object 'doc'. Write * the extracted contents to '*out' if successful or fills '*errMsg', if exising, * otherwise. This variant relies on T having a parseBSON, which all |