summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/parsed_exclusion_projection.h
diff options
context:
space:
mode:
authorJames Wahlin <james.wahlin@10gen.com>2017-04-05 09:59:54 -0400
committerJames Wahlin <james.wahlin@10gen.com>2017-04-29 09:21:00 -0400
commit5273c2bad7df58c44afdd677609b8656f399a906 (patch)
tree0257684f5555293d72e07179c6b058081c247019 /src/mongo/db/pipeline/parsed_exclusion_projection.h
parent2e8e60bfef83ac9c7bf494b0f80977686cb1b772 (diff)
downloadmongo-5273c2bad7df58c44afdd677609b8656f399a906.tar.gz
SERVER-28651 Move agg var ownership to ExpressionContext
Diffstat (limited to 'src/mongo/db/pipeline/parsed_exclusion_projection.h')
-rw-r--r--src/mongo/db/pipeline/parsed_exclusion_projection.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mongo/db/pipeline/parsed_exclusion_projection.h b/src/mongo/db/pipeline/parsed_exclusion_projection.h
index 8f64ac5258e..feb868f08ca 100644
--- a/src/mongo/db/pipeline/parsed_exclusion_projection.h
+++ b/src/mongo/db/pipeline/parsed_exclusion_projection.h
@@ -97,7 +97,8 @@ private:
*/
class ParsedExclusionProjection : public ParsedAggregationProjection {
public:
- ParsedExclusionProjection() : ParsedAggregationProjection(), _root(new ExclusionNode()) {}
+ ParsedExclusionProjection(const boost::intrusive_ptr<ExpressionContext>& expCtx)
+ : ParsedAggregationProjection(expCtx), _root(new ExclusionNode()) {}
ProjectionType getType() const final {
return ProjectionType::kExclusion;
@@ -108,8 +109,8 @@ public:
/**
* Parses the projection specification given by 'spec', populating internal data structures.
*/
- void parse(const boost::intrusive_ptr<ExpressionContext>& expCtx, const BSONObj& spec) final {
- parse(expCtx, spec, _root.get(), 0);
+ void parse(const BSONObj& spec) final {
+ parse(spec, _root.get(), 0);
}
/**
@@ -134,10 +135,7 @@ private:
* Traverses 'spec' and parses each field. Adds any excluded fields at this level to 'node',
* and recurses on any sub-objects.
*/
- void parse(const boost::intrusive_ptr<ExpressionContext>& expCtx,
- const BSONObj& spec,
- ExclusionNode* node,
- size_t depth);
+ void parse(const BSONObj& spec, ExclusionNode* node, size_t depth);
// The ExclusionNode tree does most of the execution work once constructed.