summaryrefslogtreecommitdiff
path: root/src/mongo/db/matcher/expression_always_boolean.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/matcher/expression_always_boolean.h')
-rw-r--r--src/mongo/db/matcher/expression_always_boolean.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/db/matcher/expression_always_boolean.h b/src/mongo/db/matcher/expression_always_boolean.h
index 901203f9eff..054b9b417ca 100644
--- a/src/mongo/db/matcher/expression_always_boolean.h
+++ b/src/mongo/db/matcher/expression_always_boolean.h
@@ -63,8 +63,11 @@ public:
}
void serialize(BSONObjBuilder* out, SerializationOptions opts) const final {
- // TODO support 'opts.redactFieldNames.'
- out->append(name(), 1);
+ if (opts.replacementForLiteralArgs) {
+ out->append(name(), *opts.replacementForLiteralArgs);
+ } else {
+ out->append(name(), 1);
+ }
}
bool equivalent(const MatchExpression* other) const final {