diff options
author | Nick Zolnierz <nicholas.zolnierz@mongodb.com> | 2019-02-25 10:14:09 -0500 |
---|---|---|
committer | Nick Zolnierz <nicholas.zolnierz@mongodb.com> | 2019-03-01 10:02:45 -0500 |
commit | adf8b17dd18bd0332a935e27eace73fc825982a3 (patch) | |
tree | e6c69c7d9afa991f5b6414d125b8d981d55a77d0 /src/mongo/db/matcher/expression.cpp | |
parent | ea8c9655768b0d482f71a44c1760600d8319bf61 (diff) | |
download | mongo-adf8b17dd18bd0332a935e27eace73fc825982a3.tar.gz |
SERVER-39233 Add the ability to modify the RHS element of a parsed MatchExpression
Diffstat (limited to 'src/mongo/db/matcher/expression.cpp')
-rw-r--r-- | src/mongo/db/matcher/expression.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/matcher/expression.cpp b/src/mongo/db/matcher/expression.cpp index b3117dcb208..35bee13f151 100644 --- a/src/mongo/db/matcher/expression.cpp +++ b/src/mongo/db/matcher/expression.cpp @@ -45,9 +45,9 @@ using std::string; MatchExpression::MatchExpression(MatchType type) : _matchType(type) {} string MatchExpression::toString() const { - StringBuilder buf; - debugString(buf, 0); - return buf.str(); + BSONObjBuilder bob; + serialize(&bob); + return bob.obj().toString(); } void MatchExpression::_debugAddSpace(StringBuilder& debug, int level) const { |