summaryrefslogtreecommitdiff
path: root/src/mongo/db/matcher/expression_where_base.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/matcher/expression_where_base.cpp')
-rw-r--r--src/mongo/db/matcher/expression_where_base.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/matcher/expression_where_base.cpp b/src/mongo/db/matcher/expression_where_base.cpp
index 30148f9a42b..b25a8febccf 100644
--- a/src/mongo/db/matcher/expression_where_base.cpp
+++ b/src/mongo/db/matcher/expression_where_base.cpp
@@ -46,8 +46,10 @@ void WhereMatchExpressionBase::debugString(StringBuilder& debug, int indentation
debug << "code: " << getCode() << "\n";
}
-void WhereMatchExpressionBase::serialize(BSONObjBuilder* out, bool includePath) const {
- out->appendCode("$where", getCode());
+void WhereMatchExpressionBase::serialize(BSONObjBuilder* out,
+ const SerializationOptions& opts,
+ bool includePath) const {
+ opts.appendLiteral(out, "$where", BSONCode(getCode()));
}
bool WhereMatchExpressionBase::equivalent(const MatchExpression* other) const {