diff options
Diffstat (limited to 'src/mongo/db/query/query_solution.h')
-rw-r--r-- | src/mongo/db/query/query_solution.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/mongo/db/query/query_solution.h b/src/mongo/db/query/query_solution.h index 224b9512b3c..aca56fcded6 100644 --- a/src/mongo/db/query/query_solution.h +++ b/src/mongo/db/query/query_solution.h @@ -217,7 +217,7 @@ private: }; struct TextNode : public QuerySolutionNode { - TextNode() {} + TextNode(IndexEntry index) : index(std::move(index)) {} virtual ~TextNode() {} virtual StageType getType() const { @@ -244,7 +244,7 @@ struct TextNode : public QuerySolutionNode { BSONObjSet _sort; - BSONObj indexKeyPattern; + IndexEntry index; std::unique_ptr<fts::FTSQuery> ftsQuery; // "Prefix" fields of a text index can handle equality predicates. We group them with the @@ -433,7 +433,7 @@ struct FetchNode : public QuerySolutionNode { }; struct IndexScanNode : public QuerySolutionNode { - IndexScanNode(); + IndexScanNode(IndexEntry index); virtual ~IndexScanNode() {} virtual void computeProperties(); @@ -467,8 +467,7 @@ struct IndexScanNode : public QuerySolutionNode { BSONObjSet _sorts; - BSONObj indexKeyPattern; - bool indexIsMultiKey; + IndexEntry index; int direction; @@ -480,7 +479,6 @@ struct IndexScanNode : public QuerySolutionNode { IndexBounds bounds; - const CollatorInterface* indexCollator; const CollatorInterface* queryCollator; }; @@ -699,7 +697,8 @@ struct SkipNode : public QuerySolutionNode { // This is a standalone stage. struct GeoNear2DNode : public QuerySolutionNode { - GeoNear2DNode() : addPointMeta(false), addDistMeta(false) {} + GeoNear2DNode(IndexEntry index) + : index(std::move(index)), addPointMeta(false), addDistMeta(false) {} virtual ~GeoNear2DNode() {} virtual StageType getType() const { @@ -728,14 +727,15 @@ struct GeoNear2DNode : public QuerySolutionNode { const GeoNearExpression* nq; IndexBounds baseBounds; - BSONObj indexKeyPattern; + IndexEntry index; bool addPointMeta; bool addDistMeta; }; // This is actually its own standalone stage. struct GeoNear2DSphereNode : public QuerySolutionNode { - GeoNear2DSphereNode() : addPointMeta(false), addDistMeta(false) {} + GeoNear2DSphereNode(IndexEntry index) + : index(std::move(index)), addPointMeta(false), addDistMeta(false) {} virtual ~GeoNear2DSphereNode() {} virtual StageType getType() const { @@ -764,7 +764,7 @@ struct GeoNear2DSphereNode : public QuerySolutionNode { const GeoNearExpression* nq; IndexBounds baseBounds; - BSONObj indexKeyPattern; + IndexEntry index; bool addPointMeta; bool addDistMeta; }; @@ -846,7 +846,7 @@ struct KeepMutationsNode : public QuerySolutionNode { * *always* skip over the current key to the next key. */ struct DistinctNode : public QuerySolutionNode { - DistinctNode() {} + DistinctNode(IndexEntry index) : index(std::move(index)) {} virtual ~DistinctNode() {} virtual StageType getType() const { @@ -860,7 +860,7 @@ struct DistinctNode : public QuerySolutionNode { return false; } bool hasField(const std::string& field) const { - return !indexKeyPattern[field].eoo(); + return !index.keyPattern[field].eoo(); } bool sortedByDiskLoc() const { return false; @@ -873,10 +873,10 @@ struct DistinctNode : public QuerySolutionNode { BSONObjSet sorts; - BSONObj indexKeyPattern; + IndexEntry index; int direction; IndexBounds bounds; - // We are distinct-ing over the 'fieldNo'-th field of 'indexKeyPattern'. + // We are distinct-ing over the 'fieldNo'-th field of 'index.keyPattern'. int fieldNo; }; @@ -885,7 +885,7 @@ struct DistinctNode : public QuerySolutionNode { * Btree. */ struct CountScanNode : public QuerySolutionNode { - CountScanNode() {} + CountScanNode(IndexEntry index) : index(std::move(index)) {} virtual ~CountScanNode() {} virtual StageType getType() const { @@ -910,7 +910,7 @@ struct CountScanNode : public QuerySolutionNode { BSONObjSet sorts; - BSONObj indexKeyPattern; + IndexEntry index; BSONObj startKey; bool startKeyInclusive; |