summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/query_request_helper.h
diff options
context:
space:
mode:
authorDavid Storch <david.storch@mongodb.com>2021-10-21 16:29:10 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-11-10 17:13:38 +0000
commit1b51a502f9201aacf760ba37b02888bbbff831da (patch)
treece2ff376a49ae3738930f4ce42eb2fbb7036582c /src/mongo/db/query/query_request_helper.h
parentb9dd38f987381211ca5217063c949638f028b592 (diff)
downloadmongo-1b51a502f9201aacf760ba37b02888bbbff831da.tar.gz
SERVER-59512 add new, cleaner query interface to DBClientBase
The new interface uses FindCommandRequest, and avoids any characteristics that relate specifically to the no-longer-supported OP_QUERY wire protocol message. This patch moves all callers of 'findOne()' onto the new API, but more work is required to fully eliminate the old 'query()' API from DBClientBase.
Diffstat (limited to 'src/mongo/db/query/query_request_helper.h')
-rw-r--r--src/mongo/db/query/query_request_helper.h13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/mongo/db/query/query_request_helper.h b/src/mongo/db/query/query_request_helper.h
index 3c7cbc53b89..4044083d89f 100644
--- a/src/mongo/db/query/query_request_helper.h
+++ b/src/mongo/db/query/query_request_helper.h
@@ -144,19 +144,10 @@ TailableModeEnum getTailableMode(const FindCommandRequest& findCommand);
*/
void validateCursorResponse(const BSONObj& outputAsBson);
-//
-// Old parsing code: SOON TO BE DEPRECATED.
-//
-
/**
- * Parse the provided legacy query object and parameters to construct a FindCommandRequest.
+ * Updates the projection object with a $meta projection for the showRecordId option.
*/
-StatusWith<std::unique_ptr<FindCommandRequest>> fromLegacyQuery(NamespaceStringOrUUID nsOrUuid,
- const BSONObj& filter,
- const Query& querySettings,
- const BSONObj& proj,
- int ntoskip,
- int queryOptions);
+void addShowRecordIdMetaProj(FindCommandRequest* findCommand);
} // namespace query_request_helper
} // namespace mongo