diff options
author | Henrik Edin <henrik.edin@mongodb.com> | 2018-06-19 15:09:01 -0400 |
---|---|---|
committer | Henrik Edin <henrik.edin@mongodb.com> | 2018-06-29 11:57:55 -0400 |
commit | cfa96795eefed2061628891c43ccdc2c256bb40a (patch) | |
tree | 110d230d14a7a60fa8b7ce937a77def7af98f1ef /src/mongo/client/query.h | |
parent | 40ad396238fdfb87a7a86e26020db2d293d23f40 (diff) | |
download | mongo-cfa96795eefed2061628891c43ccdc2c256bb40a.tar.gz |
SERVER-35115 Separate dbclientinterface.h into several parts, one per class.
Diffstat (limited to 'src/mongo/client/query.h')
-rw-r--r-- | src/mongo/client/query.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/client/query.h b/src/mongo/client/query.h index 37af5b0659e..68e972063b9 100644 --- a/src/mongo/client/query.h +++ b/src/mongo/client/query.h @@ -159,6 +159,10 @@ private: } }; +inline std::ostream& operator<<(std::ostream& s, const Query& q) { + return s << q.toString(); +} + void assembleQueryRequest(const std::string& ns, BSONObj query, int nToReturn, @@ -167,4 +171,9 @@ void assembleQueryRequest(const std::string& ns, int queryOptions, Message& toSend); +/** Typically one uses the QUERY(...) macro to construct a Query object. +Example: QUERY( "age" << 33 << "school" << "UCLA" ) +*/ +#define QUERY(x) ::mongo::Query(BSON(x)) + } // namespace mongo |