summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/query_settings.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/query/query_settings.h')
-rw-r--r--src/mongo/db/query/query_settings.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mongo/db/query/query_settings.h b/src/mongo/db/query/query_settings.h
index 48db5f7ed83..3e69a2ca55f 100644
--- a/src/mongo/db/query/query_settings.h
+++ b/src/mongo/db/query/query_settings.h
@@ -117,8 +117,7 @@ public:
* Returns AllowedIndicesFilter for the query if it is set in the query settings, or
* boost::none if it isn't.
*/
- boost::optional<AllowedIndicesFilter> getAllowedIndicesFilter(
- const CanonicalQuery::QueryShapeString& query) const;
+ boost::optional<AllowedIndicesFilter> getAllowedIndicesFilter(const PlanCacheKey& query) const;
/**
* Returns copies of all overrides for the collection.
@@ -130,13 +129,14 @@ public:
* If existing entry is found for the same key, replaces it.
*/
void setAllowedIndices(const CanonicalQuery& canonicalQuery,
+ const PlanCacheKey& key,
const BSONObjSet& indexKeyPatterns,
const stdx::unordered_set<std::string>& indexNames);
/**
* Removes single entry from query settings. No effect if query shape is not found.
*/
- void removeAllowedIndices(const CanonicalQuery::QueryShapeString& canonicalQuery);
+ void removeAllowedIndices(const PlanCacheKey& canonicalQuery);
/**
* Clears all allowed indices from query settings.
@@ -145,8 +145,7 @@ public:
private:
// Allowed index entries owned here.
- using AllowedIndexEntryMap =
- stdx::unordered_map<CanonicalQuery::QueryShapeString, AllowedIndexEntry>;
+ using AllowedIndexEntryMap = stdx::unordered_map<PlanCacheKey, AllowedIndexEntry>;
AllowedIndexEntryMap _allowedIndexEntryMap;
/**