diff options
Diffstat (limited to 'src/mongo/db/matcher/expression_parser.h')
-rw-r--r-- | src/mongo/db/matcher/expression_parser.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mongo/db/matcher/expression_parser.h b/src/mongo/db/matcher/expression_parser.h index 630f556e020..b6a7f9c21c6 100644 --- a/src/mongo/db/matcher/expression_parser.h +++ b/src/mongo/db/matcher/expression_parser.h @@ -82,6 +82,13 @@ public: */ static StatusWith<long long> parseIntegerElementToLong(BSONElement elem); + /** + * Given a path over which to match, and a type alias (e.g. "long", "number", or "object"), + * returns the corresponding $type match expression node. + */ + static StatusWith<std::unique_ptr<TypeMatchExpression>> parseTypeFromAlias( + StringData path, StringData typeAlias); + private: MatchExpressionParser(const ExtensionsCallback* extensionsCallback) : _extensionsCallback(extensionsCallback) {} @@ -203,10 +210,6 @@ private: StatusWithMatchExpression _parseInternalSchemaSingleIntegerArgument( const char* name, const BSONElement& elem) const; - - // The maximum allowed depth of a query tree. Just to guard against stack overflow. - static const int kMaximumTreeDepth; - // Performs parsing for the match extensions. We do not own this pointer - it has to live // as long as the parser is active. const ExtensionsCallback* _extensionsCallback; |