mongo::DatabaseHolder Class Reference
#include <db.h>
List of all members.
Public Types |
typedef map< string, Database * > | DBs |
typedef map< string, DBs > | Paths |
Public Member Functions |
bool | closeAll (const string &path, BSONObjBuilder &result, bool force) |
| DatabaseHolder () |
void | erase (const string &ns, const string &path) |
void | forEach (boost::function< void(Database *)> f) const |
Database * | get (const string &ns, const string &path) const |
void | getAllShortNames (set< string > &all) const |
Database * | getOrCreate (const string &ns, const string &path, bool &justCreated) |
bool | isLoaded (const string &ns, const string &path) const |
void | put (const string &ns, const string &path, Database *db) |
int | size () |
Private Member Functions |
string | __todb (const string &ns) const |
string | _todb (const string &ns) const |
Private Attributes |
Paths | _paths |
int | _size |
Detailed Description
class to hold path + dbname -> Database might be able to optimizer further
Definition at line 33 of file db.h.
Member Typedef Documentation
Definition at line 35 of file db.h.
Definition at line 36 of file db.h.
Constructor & Destructor Documentation
mongo::DatabaseHolder::DatabaseHolder |
( |
|
) |
[inline] |
Definition at line 38 of file db.h.
Member Function Documentation
string mongo::DatabaseHolder::__todb |
( |
const string & |
ns |
) |
const [inline, private] |
Definition at line 123 of file db.h.
string mongo::DatabaseHolder::_todb |
( |
const string & |
ns |
) |
const [inline, private] |
Definition at line 117 of file db.h.
bool mongo::DatabaseHolder::closeAll |
( |
const string & |
path, |
|
|
BSONObjBuilder & |
result, |
|
|
bool |
force | |
|
) |
| | |
void mongo::DatabaseHolder::erase |
( |
const string & |
ns, |
|
|
const string & |
path | |
|
) |
| | [inline] |
Definition at line 79 of file db.h.
void mongo::DatabaseHolder::forEach |
( |
boost::function< void(Database *)> |
f |
) |
const [inline] |
Definition at line 92 of file db.h.
Database* mongo::DatabaseHolder::get |
( |
const string & |
ns, |
|
|
const string & |
path | |
|
) |
| | const [inline] |
Definition at line 53 of file db.h.
void mongo::DatabaseHolder::getAllShortNames |
( |
set< string > & |
all |
) |
const [inline] |
gets all unique db names, ignoring paths
Definition at line 105 of file db.h.
Database* mongo::DatabaseHolder::getOrCreate |
( |
const string & |
ns, |
|
|
const string & |
path, |
|
|
bool & |
justCreated | |
|
) |
| | |
bool mongo::DatabaseHolder::isLoaded |
( |
const string & |
ns, |
|
|
const string & |
path | |
|
) |
| | const [inline] |
Definition at line 40 of file db.h.
void mongo::DatabaseHolder::put |
( |
const string & |
ns, |
|
|
const string & |
path, |
|
|
Database * |
db | |
|
) |
| | [inline] |
Definition at line 68 of file db.h.
int mongo::DatabaseHolder::size |
( |
|
) |
[inline] |
Definition at line 88 of file db.h.
Member Data Documentation
Definition at line 133 of file db.h.
Definition at line 134 of file db.h.
The documentation for this class was generated from the following file: