diff options
Diffstat (limited to 'src/mongo/db/pipeline/pipeline_d.h')
-rw-r--r-- | src/mongo/db/pipeline/pipeline_d.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/mongo/db/pipeline/pipeline_d.h b/src/mongo/db/pipeline/pipeline_d.h index ec1baacf6fd..96a2b83c57c 100644 --- a/src/mongo/db/pipeline/pipeline_d.h +++ b/src/mongo/db/pipeline/pipeline_d.h @@ -43,6 +43,7 @@ namespace mongo { class Collection; +class CollectionPtr; class DocumentSourceCursor; class DocumentSourceMatch; class DocumentSourceSort; @@ -67,7 +68,7 @@ public: * the new stage to the pipeline. */ using AttachExecutorCallback = std::function<void( - const Collection*, std::unique_ptr<PlanExecutor, PlanExecutor::Deleter>, Pipeline*)>; + const CollectionPtr&, std::unique_ptr<PlanExecutor, PlanExecutor::Deleter>, Pipeline*)>; /** * This method looks for early pipeline stages that can be folded into the underlying @@ -88,7 +89,7 @@ public: * 'nullptr'. */ static std::pair<AttachExecutorCallback, std::unique_ptr<PlanExecutor, PlanExecutor::Deleter>> - buildInnerQueryExecutor(const Collection* collection, + buildInnerQueryExecutor(const CollectionPtr& collection, const NamespaceString& nss, const AggregationRequest* aggRequest, Pipeline* pipeline); @@ -101,7 +102,7 @@ public: * 'nullptr'. */ static void attachInnerQueryExecutorToPipeline( - const Collection* collection, + const CollectionPtr& collection, AttachExecutorCallback attachExecutorCallback, std::unique_ptr<PlanExecutor, PlanExecutor::Deleter> exec, Pipeline* pipeline); @@ -112,7 +113,7 @@ public: * used when the executor attachment phase doesn't need to be deferred and the $cursor stage * can be created right after buiding the executor. */ - static void buildAndAttachInnerQueryExecutorToPipeline(const Collection* collection, + static void buildAndAttachInnerQueryExecutorToPipeline(const CollectionPtr& collection, const NamespaceString& nss, const AggregationRequest* aggRequest, Pipeline* pipeline); @@ -130,7 +131,7 @@ public: */ static std::unique_ptr<CollatorInterface> resolveCollator(OperationContext* opCtx, BSONObj userCollation, - const Collection* collection) { + const CollectionPtr& collection) { if (!userCollation.isEmpty()) { return uassertStatusOK(CollatorFactoryInterface::get(opCtx->getServiceContext()) ->makeFromBSON(userCollation)); @@ -149,7 +150,7 @@ private: * the 'pipeline'. */ static std::pair<AttachExecutorCallback, std::unique_ptr<PlanExecutor, PlanExecutor::Deleter>> - buildInnerQueryExecutorGeneric(const Collection* collection, + buildInnerQueryExecutorGeneric(const CollectionPtr& collection, const NamespaceString& nss, const AggregationRequest* aggRequest, Pipeline* pipeline); @@ -160,7 +161,7 @@ private: * not exist, as the $geoNearCursor requires a 2d or 2dsphere index. */ static std::pair<AttachExecutorCallback, std::unique_ptr<PlanExecutor, PlanExecutor::Deleter>> - buildInnerQueryExecutorGeoNear(const Collection* collection, + buildInnerQueryExecutorGeoNear(const CollectionPtr& collection, const NamespaceString& nss, const AggregationRequest* aggRequest, Pipeline* pipeline); @@ -179,7 +180,7 @@ private: */ static StatusWith<std::unique_ptr<PlanExecutor, PlanExecutor::Deleter>> prepareExecutor( const boost::intrusive_ptr<ExpressionContext>& expCtx, - const Collection* collection, + const CollectionPtr& collection, const NamespaceString& nss, Pipeline* pipeline, const boost::intrusive_ptr<DocumentSourceSort>& sortStage, |