diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-12-05 13:47:54 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-12-06 09:04:36 -0500 |
commit | d5be73dbe4d28211994746dc1f5b47fb840ccdbd (patch) | |
tree | 4a27750cfaad68c90671bc14ef83759e0e607a47 /src/mongo/db/range_arithmetic.h | |
parent | a18859168f73428522d4338fee982329d9d431ed (diff) | |
download | mongo-d5be73dbe4d28211994746dc1f5b47fb840ccdbd.tar.gz |
SERVER-31056 Remove the KeyRange type from non-test code
Diffstat (limited to 'src/mongo/db/range_arithmetic.h')
-rw-r--r-- | src/mongo/db/range_arithmetic.h | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/mongo/db/range_arithmetic.h b/src/mongo/db/range_arithmetic.h index 75707ca9b44..91e35d8bd6f 100644 --- a/src/mongo/db/range_arithmetic.h +++ b/src/mongo/db/range_arithmetic.h @@ -38,45 +38,6 @@ namespace mongo { /** - * A KeyRange represents a range over keys of documents in a namespace, qualified by a - * key pattern which defines the documents that are in the key range. - * - * There may be many different expressions to generate the same key fields from a document - the - * keyPattern tells us these expressions. - * - * Ex: - * DocA : { field : "aaaa" } - * DocB : { field : "bbb" } - * DocC : { field : "ccccc" } - * - * keyPattern : { field : 1 } - * minKey : { field : "aaaa" } : Id(DocA) - * maxKey : { field : "ccccc" } : Id(DocB) - * - * contains Id(DocB) - * - * keyPattern : { field : "numberofletters" } - * minKey : { field : 4 } : numberofletters(DocA) - * maxKey : { field : 5 } : numberofletters(DocC) - * - * does not contain numberofletters(DocB) - */ -struct KeyRange { - KeyRange(const std::string& ns, - const BSONObj& minKey, - const BSONObj& maxKey, - const BSONObj& keyPattern) - : ns(ns), minKey(minKey), maxKey(maxKey), keyPattern(keyPattern) {} - - KeyRange() {} - - std::string ns; - BSONObj minKey; - BSONObj maxKey; - BSONObj keyPattern; -}; - -/** * Returns true if the point is within the range [inclusiveLower, exclusiveUpper). */ bool rangeContains(const BSONObj& inclusiveLower, |