summaryrefslogtreecommitdiff
path: root/src/mongo/db/matcher/expression_where_noop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/matcher/expression_where_noop.cpp')
-rw-r--r--src/mongo/db/matcher/expression_where_noop.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/matcher/expression_where_noop.cpp b/src/mongo/db/matcher/expression_where_noop.cpp
index 10aee8ff457..f88a65d93f6 100644
--- a/src/mongo/db/matcher/expression_where_noop.cpp
+++ b/src/mongo/db/matcher/expression_where_noop.cpp
@@ -67,6 +67,8 @@ namespace mongo {
virtual void debugString( StringBuilder& debug, int level = 0 ) const;
+ virtual void toBSON(BSONObjBuilder* out) const;
+
virtual bool equivalent( const MatchExpression* other ) const ;
virtual void resetTag() { setTag(NULL); }
@@ -92,6 +94,10 @@ namespace mongo {
debug << "code: " << _code << "\n";
}
+ void WhereNoOpMatchExpression::toBSON(BSONObjBuilder* out) const {
+ out->append("$where", _code);
+ }
+
bool WhereNoOpMatchExpression::equivalent( const MatchExpression* other ) const {
if ( matchType() != other->matchType() )
return false;