diff options
author | Anton Korshunov <anton.korshunov@mongodb.com> | 2019-09-05 23:54:44 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-09-05 23:54:44 +0000 |
commit | bccfc2fdbdf32303cd93f06222a57b51c7c4cb6f (patch) | |
tree | 734e2b12c17c3dd809b192c43ba64a2d63407ee6 /src/mongo/db/query/query_request.cpp | |
parent | 08a9563d5cd737ac94a4f665ed515cfc4e56cc1d (diff) | |
download | mongo-bccfc2fdbdf32303cd93f06222a57b51c7c4cb6f.tar.gz |
SERVER-42416 Move returnKey execution code to separate PlanStage
Diffstat (limited to 'src/mongo/db/query/query_request.cpp')
-rw-r--r-- | src/mongo/db/query/query_request.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/mongo/db/query/query_request.cpp b/src/mongo/db/query/query_request.cpp index b3c87b40ab8..fde6441559b 100644 --- a/src/mongo/db/query/query_request.cpp +++ b/src/mongo/db/query/query_request.cpp @@ -58,7 +58,6 @@ const char QueryRequest::queryOptionMaxTimeMS[] = "$maxTimeMS"; const string QueryRequest::metaGeoNearDistance("geoNearDistance"); const string QueryRequest::metaGeoNearPoint("geoNearPoint"); -const string QueryRequest::metaIndexKey("indexKey"); const string QueryRequest::metaRecordId("recordId"); const string QueryRequest::metaSortKey("sortKey"); const string QueryRequest::metaTextScore("textScore"); @@ -592,16 +591,6 @@ void QueryRequest::asFindCommandInternal(BSONObjBuilder* cmdBuilder) const { } } -void QueryRequest::addReturnKeyMetaProj() { - BSONObjBuilder projBob; - projBob.appendElements(_proj); - // We use $$ because it's never going to show up in a user's projection. - // The exact text doesn't matter. - BSONObj indexKey = BSON("$$" << BSON("$meta" << QueryRequest::metaIndexKey)); - projBob.append(indexKey.firstElement()); - _proj = projBob.obj(); -} - void QueryRequest::addShowRecordIdMetaProj() { BSONObjBuilder projBob; projBob.appendElements(_proj); @@ -937,7 +926,6 @@ Status QueryRequest::initFullQuery(const BSONObj& top) { // Won't throw. if (e.trueValue()) { _returnKey = true; - addReturnKeyMetaProj(); } } else if (name == "showDiskLoc") { // Won't throw. @@ -1004,11 +992,6 @@ void QueryRequest::initFromInt(int options) { } void QueryRequest::addMetaProjection() { - // We might need to update the projection object with a $meta projection. - if (returnKey()) { - addReturnKeyMetaProj(); - } - if (showRecordId()) { addShowRecordIdMetaProj(); } |