summaryrefslogtreecommitdiff
path: root/src/mongo/db/matcher/expression.h
diff options
context:
space:
mode:
authorJames Wahlin <james@mongodb.com>2017-09-09 11:38:46 -0400
committerJames Wahlin <james@mongodb.com>2017-09-10 20:16:34 -0400
commitd0f5e2b103a5f78967c460533f4f8850f02facd6 (patch)
tree285e0bf71e74d114c2255534f8a17e69cf7c1f0a /src/mongo/db/matcher/expression.h
parent820abe30691f09011183b63ab63cb1e9c43f3d9e (diff)
downloadmongo-d0f5e2b103a5f78967c460533f4f8850f02facd6.tar.gz
SERVER-30951 Add top-level $expr to MatchExpression
Diffstat (limited to 'src/mongo/db/matcher/expression.h')
-rw-r--r--src/mongo/db/matcher/expression.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/matcher/expression.h b/src/mongo/db/matcher/expression.h
index c9eeb38463b..49c032232ef 100644
--- a/src/mongo/db/matcher/expression.h
+++ b/src/mongo/db/matcher/expression.h
@@ -37,6 +37,7 @@
#include "mongo/bson/bsonobjbuilder.h"
#include "mongo/db/matcher/match_details.h"
#include "mongo/db/matcher/matchable.h"
+#include "mongo/db/pipeline/dependencies.h"
#include "mongo/stdx/memory.h"
namespace mongo {
@@ -84,6 +85,7 @@ public:
TYPE_OPERATOR,
GEO,
WHERE,
+ EXPRESSION,
// Boolean expressions.
ALWAYS_FALSE,
@@ -244,6 +246,11 @@ public:
void setCollator(const CollatorInterface* collator);
/**
+ * Add the fields required for matching to 'deps'.
+ */
+ void addDependencies(DepsTracker* deps) const;
+
+ /**
* Serialize the MatchExpression to BSON, appending to 'out'. Output of this method is expected
* to be a valid query object, that, when parsed, produces a logically equivalent
* MatchExpression.
@@ -263,6 +270,8 @@ protected:
*/
virtual void _doSetCollator(const CollatorInterface* collator){};
+ virtual void _doAddDependencies(DepsTracker* deps) const {}
+
void _debugAddSpace(StringBuilder& debug, int level) const;
private: