diff options
Diffstat (limited to 'client/dbclient.h')
-rw-r--r-- | client/dbclient.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client/dbclient.h b/client/dbclient.h index 5949cde1f00..572df9209f7 100644 --- a/client/dbclient.h +++ b/client/dbclient.h @@ -79,7 +79,7 @@ namespace mongo { Example: QUERY( "age" << 33 << "school" << "UCLA" ).sort("name") */ - class Query { + class Query : public Stringable { public: BSONObj obj; Query(const BSONObj& b) : obj(b) { } @@ -133,8 +133,10 @@ namespace mongo { */ Query& where(const char *jscode, BSONObj scope); Query& where(const char *jscode) { return where(jscode, BSONObj()); } - }; + virtual string toString() const; + }; + /** Typically one uses the QUERY(...) macro to construct a Query object. Example: QUERY( "age" << 33 << "school" << "UCLA" ) */ |