diff options
author | Tess Avitabile <tess.avitabile@mongodb.com> | 2016-03-15 13:24:07 -0400 |
---|---|---|
committer | Tess Avitabile <tess.avitabile@mongodb.com> | 2016-03-15 13:37:43 -0400 |
commit | 652e3577be3d157cec039d0b017cf7e2d6e2c7c6 (patch) | |
tree | 2478eba66f4f32fb7f51882506bb5535a5e3f3ab /src/mongo/db/query/indexability.h | |
parent | 61fd8eefb0fd8e563014b82b2d928d9b0bafda7b (diff) | |
download | mongo-652e3577be3d157cec039d0b017cf7e2d6e2c7c6.tar.gz |
SERVER-22785 Update QueryPlannerIXSelect's index selection code to be collation-aware
Diffstat (limited to 'src/mongo/db/query/indexability.h')
-rw-r--r-- | src/mongo/db/query/indexability.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/query/indexability.h b/src/mongo/db/query/indexability.h index a68bf3f328a..6c8ce44bbb8 100644 --- a/src/mongo/db/query/indexability.h +++ b/src/mongo/db/query/indexability.h @@ -131,6 +131,15 @@ public: return isBoundsGeneratingNot(me) || nodeCanUseIndexOnOwnField(me); } + /** + * Returns true if 'me' is of type EQ, GT, GTE, LT, or LTE. + */ + static bool isEqualityOrInequality(const MatchExpression* me) { + return (me->matchType() == MatchExpression::EQ || me->matchType() == MatchExpression::GT || + me->matchType() == MatchExpression::GTE || me->matchType() == MatchExpression::LT || + me->matchType() == MatchExpression::LTE); + } + private: /** * Returns true if 'me' is "sargable" but is not a negation and |