diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2015-06-20 00:22:50 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2015-06-20 10:56:02 -0400 |
commit | 9c2ed42daa8fbbef4a919c21ec564e2db55e8d60 (patch) | |
tree | 3814f79c10d7b490948d8cb7b112ac1dd41ceff1 /src/mongo/db/query/index_entry.h | |
parent | 01965cf52bce6976637ecb8f4a622aeb05ab256a (diff) | |
download | mongo-9c2ed42daa8fbbef4a919c21ec564e2db55e8d60.tar.gz |
SERVER-18579: Clang-Format - reformat code, no comment reflow
Diffstat (limited to 'src/mongo/db/query/index_entry.h')
-rw-r--r-- | src/mongo/db/query/index_entry.h | 161 |
1 files changed, 79 insertions, 82 deletions
diff --git a/src/mongo/db/query/index_entry.h b/src/mongo/db/query/index_entry.h index c27be6bb3bd..9a785abef8b 100644 --- a/src/mongo/db/query/index_entry.h +++ b/src/mongo/db/query/index_entry.h @@ -36,90 +36,87 @@ namespace mongo { - class MatchExpression; +class MatchExpression; + +/** + * This name sucks, but every name involving 'index' is used somewhere. + */ +struct IndexEntry { + /** + * Use this constructor if you're making an IndexEntry from the catalog. + */ + IndexEntry(const BSONObj& kp, + const std::string& accessMethod, + bool mk, + bool sp, + bool unq, + const std::string& n, + const MatchExpression* fe, + const BSONObj& io) + : keyPattern(kp), + multikey(mk), + sparse(sp), + unique(unq), + name(n), + filterExpr(fe), + infoObj(io) { + type = IndexNames::nameToType(accessMethod); + } /** - * This name sucks, but every name involving 'index' is used somewhere. + * For testing purposes only. */ - struct IndexEntry { - /** - * Use this constructor if you're making an IndexEntry from the catalog. - */ - IndexEntry(const BSONObj& kp, - const std::string& accessMethod, - bool mk, - bool sp, - bool unq, - const std::string& n, - const MatchExpression* fe, - const BSONObj& io) - : keyPattern(kp), - multikey(mk), - sparse(sp), - unique(unq), - name(n), - filterExpr(fe), - infoObj(io) { - - type = IndexNames::nameToType(accessMethod); - } - - /** - * For testing purposes only. - */ - IndexEntry(const BSONObj& kp, - bool mk, - bool sp, - bool unq, - const std::string& n, - const MatchExpression* fe, - const BSONObj& io) - : keyPattern(kp), - multikey(mk), - sparse(sp), - unique(unq), - name(n), - filterExpr(fe), - infoObj(io) { - - type = IndexNames::nameToType(IndexNames::findPluginName(keyPattern)); - } - - /** - * For testing purposes only. - */ - IndexEntry(const BSONObj& kp) - : keyPattern(kp), - multikey(false), - sparse(false), - unique(false), - name("test_foo"), - filterExpr(nullptr), - infoObj(BSONObj()) { - - type = IndexNames::nameToType(IndexNames::findPluginName(keyPattern)); - } - - BSONObj keyPattern; - - bool multikey; - - bool sparse; - - bool unique; - - std::string name; - - const MatchExpression* filterExpr; - - // Geo indices have extra parameters. We need those available to plan correctly. - BSONObj infoObj; - - // What type of index is this? (What access method can we use on the index described - // by the keyPattern?) - IndexType type; - - std::string toString() const; - }; + IndexEntry(const BSONObj& kp, + bool mk, + bool sp, + bool unq, + const std::string& n, + const MatchExpression* fe, + const BSONObj& io) + : keyPattern(kp), + multikey(mk), + sparse(sp), + unique(unq), + name(n), + filterExpr(fe), + infoObj(io) { + type = IndexNames::nameToType(IndexNames::findPluginName(keyPattern)); + } + + /** + * For testing purposes only. + */ + IndexEntry(const BSONObj& kp) + : keyPattern(kp), + multikey(false), + sparse(false), + unique(false), + name("test_foo"), + filterExpr(nullptr), + infoObj(BSONObj()) { + type = IndexNames::nameToType(IndexNames::findPluginName(keyPattern)); + } + + BSONObj keyPattern; + + bool multikey; + + bool sparse; + + bool unique; + + std::string name; + + const MatchExpression* filterExpr; + + // Geo indices have extra parameters. We need those available to plan correctly. + BSONObj infoObj; + + // What type of index is this? (What access method can we use on the index described + // by the keyPattern?) + IndexType type; + + std::string toString() const; +}; } // namespace mongo |