summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/index_bounds_builder.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/query/index_bounds_builder.h')
-rw-r--r--src/mongo/db/query/index_bounds_builder.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/mongo/db/query/index_bounds_builder.h b/src/mongo/db/query/index_bounds_builder.h
index 2e760ed663c..195508b30b9 100644
--- a/src/mongo/db/query/index_bounds_builder.h
+++ b/src/mongo/db/query/index_bounds_builder.h
@@ -41,15 +41,24 @@ namespace mongo {
*/
class IndexBoundsBuilder {
public:
+ /**
+ * Describes various degrees of precision with which predicates can be evaluated based
+ * on the index bounds.
+ *
+ * The integer values of the enum are significant, and are assigned in order of
+ * increasing tightness. These values are used when we need to do comparison between two
+ * BoundsTightness values. Such comparisons can answer questions such as "Does predicate
+ * X have tighter or looser bounds than predicate Y?".
+ */
enum BoundsTightness {
- // Index bounds are exact.
- EXACT,
+ // Index bounds are inexact, but no fetch is required
+ INEXACT_COVERED = 0,
// Index bounds are inexact, and a fetch is required.
- INEXACT_FETCH,
+ INEXACT_FETCH = 1,
- // Index bounds are inexact, but no fetch is required
- INEXACT_COVERED
+ // Index bounds are exact.
+ EXACT = 2
};
/**