diff options
author | David Storch <david.storch@10gen.com> | 2014-06-03 11:04:28 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2014-06-11 11:57:00 -0400 |
commit | 3e39c96ebbd90ebeb91d46f9dace6988a0152763 (patch) | |
tree | 147db9b069d4c65e8233a3f826dde9cefeddf60c /src/mongo/db/query/index_bounds.h | |
parent | c4db5777873c4973facc7ea5ba727565e7658d73 (diff) | |
download | mongo-3e39c96ebbd90ebeb91d46f9dace6988a0152763.tar.gz |
SERVER-14096 explain find() at queryPlanner verbosity
Enable by the setParameter 'enableNewExplain'
Diffstat (limited to 'src/mongo/db/query/index_bounds.h')
-rw-r--r-- | src/mongo/db/query/index_bounds.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mongo/db/query/index_bounds.h b/src/mongo/db/query/index_bounds.h index b5236d2d4e4..514070b9db4 100644 --- a/src/mongo/db/query/index_bounds.h +++ b/src/mongo/db/query/index_bounds.h @@ -93,6 +93,25 @@ namespace mongo { size_t getNumIntervals(size_t i) const; Interval getInterval(size_t i, size_t j) const; std::string toString() const; + + /** + * Legacy BSON format for explain. The format is an array of arrays for each field. + * + * TODO remove this function once the new explain format is on by default. + * + * Ex. + * {a: [ [1, 1], [3, 10] ], b: [ [Infinity, 10] ] } + */ + BSONObj toLegacyBSON() const; + + /** + * BSON format for explain. The format is an array of strings for each field. + * Each string represents an interval. The strings use "[" and "]" if the interval + * bounds are inclusive, and "(" / ")" if exclusive. + * + * Ex. + * {a: ["[1, 1]", "(3, 10)"], b: ["[Infinity, 10)"] } + */ BSONObj toBSON() const; // TODO: we use this for max/min scan. Consider migrating that. |