summaryrefslogtreecommitdiff
path: root/src/mongo/db/field_parser.h
diff options
context:
space:
mode:
authorGreg Studer <greg@10gen.com>2014-06-05 14:57:34 -0400
committerGreg Studer <greg@10gen.com>2014-06-10 17:06:53 -0400
commit6537dc777512d093a489cb1db99e8db8cf50b914 (patch)
treec1513b2afeb44a500d57a8316e3b65139b56f7f4 /src/mongo/db/field_parser.h
parente191494d5092181e222c022fe44741951af91a2f (diff)
downloadmongo-6537dc777512d093a489cb1db99e8db8cf50b914.tar.gz
SERVER-5800 convert 2d predicate queries into covered index scans
Diffstat (limited to 'src/mongo/db/field_parser.h')
-rw-r--r--src/mongo/db/field_parser.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mongo/db/field_parser.h b/src/mongo/db/field_parser.h
index a0897c16fdd..bd6d852e71f 100644
--- a/src/mongo/db/field_parser.h
+++ b/src/mongo/db/field_parser.h
@@ -156,6 +156,16 @@ namespace mongo {
long long* out,
std::string* errMsg = NULL );
+ static FieldState extract( BSONElement elem,
+ const BSONField<double>& field,
+ double* out,
+ std::string* errMsg = NULL );
+
+ static FieldState extract( BSONObj doc,
+ const BSONField<double>& field,
+ double* out,
+ std::string* errMsg = NULL );
+
/**
* The following extractNumber methods do implicit conversion between any numeric type and
* the BSONField type. This can be useful when an exact numeric type is not needed, for
@@ -181,6 +191,16 @@ namespace mongo {
long long* out,
std::string* errMsg = NULL );
+ static FieldState extractNumber( BSONObj doc,
+ const BSONField<double>& field,
+ double* out,
+ std::string* errMsg = NULL );
+
+ static FieldState extractNumber( BSONElement elem,
+ const BSONField<double>& field,
+ double* out,
+ std::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.