summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/pipeline_d.h
diff options
context:
space:
mode:
authorJames Wahlin <james.wahlin@10gen.com>2017-01-24 16:48:31 -0500
committerJames Wahlin <james.wahlin@10gen.com>2017-02-03 08:26:50 -0500
commit529adf30a88770c44b8dea31323f114975dfd78b (patch)
treedc18ec945b950a410d7e9d235b3de67587af6d34 /src/mongo/db/pipeline/pipeline_d.h
parent47da0b53f9cd27aeec1d2822780784866269a47d (diff)
downloadmongo-529adf30a88770c44b8dea31323f114975dfd78b.tar.gz
SERVER-27848 Add index hint to aggregation and non-materialized views
Diffstat (limited to 'src/mongo/db/pipeline/pipeline_d.h')
-rw-r--r--src/mongo/db/pipeline/pipeline_d.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/pipeline_d.h b/src/mongo/db/pipeline/pipeline_d.h
index 20b6cf16965..2df4dc45036 100644
--- a/src/mongo/db/pipeline/pipeline_d.h
+++ b/src/mongo/db/pipeline/pipeline_d.h
@@ -33,6 +33,7 @@
#include "mongo/bson/bsonobj.h"
#include "mongo/db/namespace_string.h"
+#include "mongo/db/pipeline/aggregation_request.h"
namespace mongo {
class Collection;
@@ -71,8 +72,11 @@ public:
* The cursor is added to the front of the pipeline's sources.
*
* Callers must take care to ensure that 'collection' is locked in at least IS-mode.
+ *
+ * When not null, 'aggRequest' provides access to pipeline command options such as hint.
*/
static void prepareCursorSource(Collection* collection,
+ const AggregationRequest* aggRequest,
const boost::intrusive_ptr<Pipeline>& pipeline);
static std::string getPlanSummaryStr(const boost::intrusive_ptr<Pipeline>& pPipeline);
@@ -101,6 +105,7 @@ private:
const boost::intrusive_ptr<DocumentSourceSort>& sortStage,
const DepsTracker& deps,
const BSONObj& queryObj,
+ const AggregationRequest* aggRequest,
BSONObj* sortObj,
BSONObj* projectionObj);