diff options
Diffstat (limited to 'src/mongo/db/query/projection.h')
-rw-r--r-- | src/mongo/db/query/projection.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/query/projection.h b/src/mongo/db/query/projection.h index 9987dd641db..914567e87ed 100644 --- a/src/mongo/db/query/projection.h +++ b/src/mongo/db/query/projection.h @@ -46,6 +46,7 @@ struct ProjectionDependencies { // Whether the entire document is required to do the projection. bool requiresDocument = false; bool hasExpressions = false; + bool containsElemMatch = false; // Which fields are necessary to perform the projection, or boost::none if all are required. boost::optional<std::set<std::string>> requiredFields; @@ -137,6 +138,10 @@ public: _deps.metadataRequested.none() && !_deps.requiresDocument && !_deps.hasExpressions; } + bool containsElemMatch() const { + return _deps.containsElemMatch; + } + private: ProjectionPathASTNode _root; ProjectType _type; |