diff options
author | Ribhav Jain <ribhav.jain@mongodb.com> | 2020-07-23 17:01:44 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-07-24 19:52:42 +0000 |
commit | f69521a0ec5a98e91a38077704b3bdca8377ebb6 (patch) | |
tree | b6d44f7461bf715d2db792bcfec23727e3e79d18 /src/mongo/db/pipeline | |
parent | d6cc68c57520075e53b930625a15d33a18683730 (diff) | |
download | mongo-f69521a0ec5a98e91a38077704b3bdca8377ebb6.tar.gz |
SERVER-48865 Implement agg boolean expression operators in grammar
Diffstat (limited to 'src/mongo/db/pipeline')
-rw-r--r-- | src/mongo/db/pipeline/expression.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/expression.h b/src/mongo/db/pipeline/expression.h index 0618833d080..73547530735 100644 --- a/src/mongo/db/pipeline/expression.h +++ b/src/mongo/db/pipeline/expression.h @@ -796,6 +796,9 @@ public: explicit ExpressionAnd(ExpressionContext* const expCtx) : ExpressionVariadic<ExpressionAnd>(expCtx) {} + ExpressionAnd(ExpressionContext* const expCtx, ExpressionVector&& children) + : ExpressionVariadic<ExpressionAnd>(expCtx, std::move(children)) {} + boost::intrusive_ptr<Expression> optimize() final; Value evaluate(const Document& root, Variables* variables) const final; const char* getOpName() const final; @@ -1828,6 +1831,9 @@ public: explicit ExpressionNot(ExpressionContext* const expCtx) : ExpressionFixedArity<ExpressionNot, 1>(expCtx) {} + ExpressionNot(ExpressionContext* const expCtx, ExpressionVector&& children) + : ExpressionFixedArity<ExpressionNot, 1>(expCtx, std::move(children)) {} + Value evaluate(const Document& root, Variables* variables) const final; const char* getOpName() const final; @@ -1897,6 +1903,9 @@ public: explicit ExpressionOr(ExpressionContext* const expCtx) : ExpressionVariadic<ExpressionOr>(expCtx) {} + ExpressionOr(ExpressionContext* const expCtx, ExpressionVector&& children) + : ExpressionVariadic<ExpressionOr>(expCtx, std::move(children)) {} + boost::intrusive_ptr<Expression> optimize() final; Value evaluate(const Document& root, Variables* variables) const final; const char* getOpName() const final; |