diff options
Diffstat (limited to 'src/mongo/db/matcher/expression_expr.cpp')
| -rw-r--r-- | src/mongo/db/matcher/expression_expr.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mongo/db/matcher/expression_expr.cpp b/src/mongo/db/matcher/expression_expr.cpp index fa9faa3c2c9..1ce4f0f6954 100644 --- a/src/mongo/db/matcher/expression_expr.cpp +++ b/src/mongo/db/matcher/expression_expr.cpp @@ -77,8 +77,10 @@ Value ExprMatchExpression::evaluateExpression(const MatchableDocument* doc) cons return _expression->evaluate(document, &variables); } -void ExprMatchExpression::serialize(BSONObjBuilder* out, bool includePath) const { - *out << "$expr" << _expression->serialize(false); +void ExprMatchExpression::serialize(BSONObjBuilder* out, + const SerializationOptions& opts, + bool includePath) const { + *out << "$expr" << _expression->serialize(opts); } bool ExprMatchExpression::equivalent(const MatchExpression* other) const { @@ -94,8 +96,8 @@ bool ExprMatchExpression::equivalent(const MatchExpression* other) const { } // TODO SERVER-30982: Add mechanism to allow for checking Expression equivalency. - return ValueComparator().evaluate(_expression->serialize(false) == - realOther->_expression->serialize(false)); + return ValueComparator().evaluate(_expression->serialize() == + realOther->_expression->serialize()); } void ExprMatchExpression::_doSetCollator(const CollatorInterface* collator) { @@ -114,7 +116,7 @@ void ExprMatchExpression::_doSetCollator(const CollatorInterface* collator) { std::unique_ptr<MatchExpression> ExprMatchExpression::shallowClone() const { // TODO SERVER-31003: Replace Expression clone via serialization with Expression::clone(). BSONObjBuilder bob; - bob << "" << _expression->serialize(false); + bob << "" << _expression->serialize(); boost::intrusive_ptr<Expression> clonedExpr = Expression::parseOperand( _expCtx.get(), bob.obj().firstElement(), _expCtx->variablesParseState); |
