summaryrefslogtreecommitdiff
path: root/src/mongo/db/field_parser.h
diff options
context:
space:
mode:
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.