diff options
Diffstat (limited to 'src/mongo/db/exec/projection_node.h')
| -rw-r--r-- | src/mongo/db/exec/projection_node.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/mongo/db/exec/projection_node.h b/src/mongo/db/exec/projection_node.h index 073fe14ae4e..cd744ef4cac 100644 --- a/src/mongo/db/exec/projection_node.h +++ b/src/mongo/db/exec/projection_node.h @@ -29,8 +29,9 @@ #pragma once -#include "mongo/db/exec/projection_executor.h" +#include <list> +#include "mongo/db/exec/projection_executor.h" #include "mongo/db/query/projection_policies.h" namespace mongo::projection_executor { @@ -128,10 +129,12 @@ public: void optimize(); - Document serialize(boost::optional<ExplainOptions::Verbosity> explain) const; + Document serialize(boost::optional<ExplainOptions::Verbosity> explain, + const SerializationOptions& options) const; void serialize(boost::optional<ExplainOptions::Verbosity> explain, - MutableDocument* output) const; + MutableDocument* output, + const SerializationOptions& options) const; protected: /** @@ -165,7 +168,14 @@ protected: StringMap<std::unique_ptr<ProjectionNode>> _children; StringMap<boost::intrusive_ptr<Expression>> _expressions; - StringSet _projectedFields; + + // List of the projected fields in the order in which they were specified. + std::list<std::string> _projectedFields; + + // Set of projected fields. Note that the _projectedFields list actually owns the strings, and + // this StringDataSet simply holds views of those strings. + StringDataSet _projectedFieldsSet; + ProjectionPolicies _policies; std::string _pathToNode; |
