mongo::ModSet Class Reference

#include <update.h>

List of all members.

Public Member Functions

BSONObj createNewFromQuery (const BSONObj &query)
ModSetfixDynamicArray (const char *elemMatchKey) const
bool hasDynamicArray () const
bool haveConflictingMod (const string &fieldName)
bool haveModForField (const char *fieldName) const
int isIndexed () const
 ModSet (const BSONObj &from, const set< string > &idxKeys=set< string >(), const set< string > *backgroundKeys=0)
auto_ptr< ModSetStateprepare (const BSONObj &obj) const
unsigned size () const

Private Types

typedef map< string, ModModHolder

Private Member Functions

FieldCompareResult compare (const ModHolder::iterator &m, map< string, BSONElement >::iterator &p, const map< string, BSONElement >::iterator &pEnd) const
bool mayAddEmbedded (map< string, BSONElement > &existing, string right)
 ModSet ()
void updateIsIndexed (const Mod &m, const set< string > &idxKeys, const set< string > *backgroundKeys)

Static Private Member Functions

static void extractFields (map< string, BSONElement > &fields, const BSONElement &top, const string &base)
static Mod::Op opFromStr (const char *fn)

Private Attributes

bool _hasDynamicArray
int _isIndexed
ModHolder _mods

Detailed Description

stores a set of Mods once created, should never be changed

Definition at line 242 of file update.h.


Member Typedef Documentation

typedef map<string,Mod> mongo::ModSet::ModHolder [private]

Definition at line 243 of file update.h.


Constructor & Destructor Documentation

mongo::ModSet::ModSet (  )  [inline, private]

Definition at line 346 of file update.h.

mongo::ModSet::ModSet ( const BSONObj from,
const set< string > &  idxKeys = set< string >(),
const set< string > *  backgroundKeys = 0 
)

Member Function Documentation

FieldCompareResult mongo::ModSet::compare ( const ModHolder::iterator &  m,
map< string, BSONElement >::iterator &  p,
const map< string, BSONElement >::iterator &  pEnd 
) const [inline, private]

Definition at line 250 of file update.h.

BSONObj mongo::ModSet::createNewFromQuery ( const BSONObj query  ) 

given a query pattern, builds an object suitable for an upsert will take the query spec and combine all $ operators

static void mongo::ModSet::extractFields ( map< string, BSONElement > &  fields,
const BSONElement top,
const string &  base 
) [static, private]
ModSet* mongo::ModSet::fixDynamicArray ( const char *  elemMatchKey  )  const
bool mongo::ModSet::hasDynamicArray (  )  const [inline]

Definition at line 365 of file update.h.

bool mongo::ModSet::haveConflictingMod ( const string &  fieldName  )  [inline]

Definition at line 392 of file update.h.

bool mongo::ModSet::haveModForField ( const char *  fieldName  )  const [inline]

Definition at line 388 of file update.h.

int mongo::ModSet::isIndexed (  )  const [inline]

Definition at line 382 of file update.h.

bool mongo::ModSet::mayAddEmbedded ( map< string, BSONElement > &  existing,
string  right 
) [inline, private]

Definition at line 266 of file update.h.

static Mod::Op mongo::ModSet::opFromStr ( const char *  fn  )  [inline, static, private]

Definition at line 277 of file update.h.

auto_ptr<ModSetState> mongo::ModSet::prepare ( const BSONObj obj  )  const

creates a ModSetState suitable for operation on obj doesn't change or modify this ModSet or any underying Mod

unsigned mongo::ModSet::size (  )  const [inline]

Definition at line 386 of file update.h.

void mongo::ModSet::updateIsIndexed ( const Mod m,
const set< string > &  idxKeys,
const set< string > *  backgroundKeys 
) [inline, private]

Definition at line 348 of file update.h.


Member Data Documentation

Definition at line 246 of file update.h.

Definition at line 245 of file update.h.

Definition at line 244 of file update.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:56 2013