mongo::ShardKeyPattern Class Reference

#include <shardkey.h>

List of all members.

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

Detailed Description

Definition at line 30 of file shardkey.h.


Constructor & Destructor Documentation

mongo::ShardKeyPattern::ShardKeyPattern ( BSONObj  p = BSONObj()  ) 

Member Function Documentation

int mongo::ShardKeyPattern::compare ( const BSONObj l,
const BSONObj r 
) const

compare shard keys from the objects specified l < r negative l == r 0 l > r positive

BSONObj mongo::ShardKeyPattern::extractKey ( const BSONObj from  )  const [inline]

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
Returns:
whether or not obj has all fields in this shard key pattern e.g. ShardKey({num:1}).hasShardKey({ name:"joe", num:3 }) is true
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
Returns:
true if 'this' is a prefix (not necessarily contained) of 'otherPattern'.
BSONObj mongo::ShardKeyPattern::key (  )  const [inline]

Definition at line 71 of file shardkey.h.

BSONObj mongo::ShardKeyPattern::moveToFront ( const BSONObj obj  )  const
Returns:
BSONObj with _id and shardkey at front. May return original object.
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

Member Data Documentation

Definition at line 98 of file shardkey.h.

Definition at line 97 of file shardkey.h.

Definition at line 96 of file shardkey.h.

Definition at line 101 of file shardkey.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


mongodb
Author(s): Nate Koenig
autogenerated on Fri Jan 11 12:15:58 2013