summaryrefslogtreecommitdiff
path: root/src/mongo/db/dbdirectclient.h
diff options
context:
space:
mode:
authorIrina Yatsenko <irina.yatsenko@mongodb.com>2021-08-16 15:35:51 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-08-23 19:44:53 +0000
commitdf329d8f46e1485dd5d70379f9c48bf4175f0d5a (patch)
tree80adf0442b021bdd689d59697a6b85ebf4dab24d /src/mongo/db/dbdirectclient.h
parent5cf8a293567989fcc970fb21cde4a1af111c8b58 (diff)
downloadmongo-df329d8f46e1485dd5d70379f9c48bf4175f0d5a.tar.gz
SERVER-58670 Tighten up what kind of BSON the 'Query' type can be wrapped around
This refactor includes: Remove dead code from 'Query' type and reduce it public interface. Split query argument in query/update/removed methods into filter BSON and settings (which are still passed around as 'Query' type). Remove Query(string) constructors. Remove most callers of 'Query(const BSONObj&)'. Replace public 'Query(const BSON&)' and 'Query.obj' with an explicit factory method and a getter.
Diffstat (limited to 'src/mongo/db/dbdirectclient.h')
-rw-r--r--src/mongo/db/dbdirectclient.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/dbdirectclient.h b/src/mongo/db/dbdirectclient.h
index 74a09f8cef3..94eff680c4a 100644
--- a/src/mongo/db/dbdirectclient.h
+++ b/src/mongo/db/dbdirectclient.h
@@ -56,7 +56,8 @@ public:
std::unique_ptr<DBClientCursor> query(
const NamespaceStringOrUUID& nsOrUuid,
- Query query,
+ const BSONObj& filter,
+ const Query& querySettings = Query(),
int limit = 0,
int nToSkip = 0,
const BSONObj* fieldsToReturn = nullptr,