#include <shardkey.h>
Public Member Functions | |
int | compare (const BSONObj &l, const BSONObj &r) const |
BSONObj | extractKey (const BSONObj &from) const |
BSONObj | globalMax () const |
BSONObj | globalMin () const |
bool | hasShardKey (const BSONObj &obj) const |
bool | isGlobal (const BSONObj &k) const |
bool | isGlobalMax (const BSONObj &k) const |
bool | isGlobalMin (const BSONObj &k) const |
bool | isPrefixOf (const BSONObj &otherPattern) const |
BSONObj | key () const |
BSONObj | moveToFront (const BSONObj &obj) const |
bool | partOfShardKey (const string &key) const |
bool | partOfShardKey (const char *key) const |
ShardKeyPattern (BSONObj p=BSONObj()) | |
string | toString () const |
Private Attributes | |
BSONObj | gMax |
BSONObj | gMin |
BSONObj | pattern |
set< string > | patternfields |
Definition at line 30 of file shardkey.h.
compare shard keys from the objects specified l < r negative l == r 0 l > r positive
Definition at line 104 of file shardkey.h.
BSONObj mongo::ShardKeyPattern::globalMax | ( | ) | const [inline] |
global max is the highest possible value for this key
Definition at line 43 of file shardkey.h.
BSONObj mongo::ShardKeyPattern::globalMin | ( | ) | const [inline] |
global min is the lowest possible value for this key e.g. { num : MinKey }
Definition at line 38 of file shardkey.h.
bool mongo::ShardKeyPattern::hasShardKey | ( | const BSONObj & | obj | ) | const |
bool mongo::ShardKeyPattern::isGlobal | ( | const BSONObj & | k | ) | const [inline] |
Definition at line 53 of file shardkey.h.
bool mongo::ShardKeyPattern::isGlobalMax | ( | const BSONObj & | k | ) | const [inline] |
Definition at line 49 of file shardkey.h.
bool mongo::ShardKeyPattern::isGlobalMin | ( | const BSONObj & | k | ) | const [inline] |
Definition at line 45 of file shardkey.h.
bool mongo::ShardKeyPattern::isPrefixOf | ( | const BSONObj & | otherPattern | ) | const |
BSONObj mongo::ShardKeyPattern::key | ( | ) | const [inline] |
Definition at line 71 of file shardkey.h.
bool mongo::ShardKeyPattern::partOfShardKey | ( | const string & | key | ) | const [inline] |
Definition at line 80 of file shardkey.h.
bool mongo::ShardKeyPattern::partOfShardKey | ( | const char * | key | ) | const [inline] |
Definition at line 77 of file shardkey.h.
string mongo::ShardKeyPattern::toString | ( | ) | const |
BSONObj mongo::ShardKeyPattern::gMax [private] |
Definition at line 98 of file shardkey.h.
BSONObj mongo::ShardKeyPattern::gMin [private] |
Definition at line 97 of file shardkey.h.
BSONObj mongo::ShardKeyPattern::pattern [private] |
Definition at line 96 of file shardkey.h.
set<string> mongo::ShardKeyPattern::patternfields [private] |
Definition at line 101 of file shardkey.h.