summaryrefslogtreecommitdiff
path: root/src/mongo/db/cst/cst_parser.h
diff options
context:
space:
mode:
authorDavid Percy <david.percy@mongodb.com>2020-09-17 04:42:36 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-09-30 22:50:57 +0000
commit8c79f80a154b337e28a4d9e364bca048f3668f21 (patch)
tree6ec1b409d16e148838d26650e93e76ee458b1f2f /src/mongo/db/cst/cst_parser.h
parentd4a95bccc5f2e6e66cb13ae40a980706112f6524 (diff)
downloadmongo-8c79f80a154b337e28a4d9e364bca048f3668f21.tar.gz
SERVER-48851 CST test-command and $expr, $text, $where, $mod
Diffstat (limited to 'src/mongo/db/cst/cst_parser.h')
-rwxr-xr-xsrc/mongo/db/cst/cst_parser.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/db/cst/cst_parser.h b/src/mongo/db/cst/cst_parser.h
index f96df0ec8ca..604359ce354 100755
--- a/src/mongo/db/cst/cst_parser.h
+++ b/src/mongo/db/cst/cst_parser.h
@@ -36,6 +36,7 @@
#include "mongo/db/cst/cst_match_translation.h"
#include "mongo/db/cst/cst_sort_translation.h"
#include "mongo/db/matcher/expression.h"
+#include "mongo/db/matcher/extensions_callback.h"
#include "mongo/db/pipeline/expression_context.h"
#include "mongo/db/query/sort_pattern.h"
@@ -45,11 +46,13 @@ namespace mongo::cst {
* Parses the given 'filter' to a MatchExpression. Throws an exception if the filter fails to parse.
*/
std::unique_ptr<MatchExpression> parseToMatchExpression(
- BSONObj filter, const boost::intrusive_ptr<ExpressionContext>& expCtx) {
+ BSONObj filter,
+ const boost::intrusive_ptr<ExpressionContext>& expCtx,
+ const ExtensionsCallback& extensionsCallback) {
BSONLexer lexer{filter, ParserGen::token::START_MATCH};
CNode cst;
ParserGen(lexer, &cst).parse();
- return cst_match_translation::translateMatchExpression(cst, expCtx);
+ return cst_match_translation::translateMatchExpression(cst, expCtx, extensionsCallback);
}
/**