#include <dbclient.h>

Public Member Functions | |
| virtual BSONObj | findOne (const string &ns, const Query &query, const BSONObj *fieldsToReturn=0, int queryOptions=0) |
| virtual auto_ptr< DBClientCursor > | getMore (const string &ns, long long cursorId, int nToReturn=0, int options=0)=0 |
| virtual string | getServerAddress () const =0 |
| virtual void | insert (const string &ns, const vector< BSONObj > &v)=0 |
| virtual void | insert (const string &ns, BSONObj obj)=0 |
| virtual auto_ptr< DBClientCursor > | query (const string &ns, Query query, int nToReturn=0, int nToSkip=0, const BSONObj *fieldsToReturn=0, int queryOptions=0, int batchSize=0)=0 |
| virtual void | remove (const string &ns, Query query, bool justOne=0)=0 |
| virtual void | update (const string &ns, Query query, BSONObj obj, bool upsert=0, bool multi=0)=0 |
| virtual | ~DBClientInterface () |
The interface that any db connection should implement
Definition at line 346 of file dbclient.h.
| virtual mongo::DBClientInterface::~DBClientInterface | ( | ) | [inline, virtual] |
Definition at line 362 of file dbclient.h.
| virtual BSONObj mongo::DBClientInterface::findOne | ( | const string & | ns, | |
| const Query & | query, | |||
| const BSONObj * | fieldsToReturn = 0, |
|||
| int | queryOptions = 0 | |||
| ) | [virtual] |
| AssertionException |
Reimplemented in mongo::DBClientReplicaSet, and mongo::SyncClusterConnection.
| virtual auto_ptr<DBClientCursor> mongo::DBClientInterface::getMore | ( | const string & | ns, | |
| long long | cursorId, | |||
| int | nToReturn = 0, |
|||
| int | options = 0 | |||
| ) | [pure virtual] |
don't use this - called automatically by DBClientCursor for you
Implemented in mongo::DBClientBase, and mongo::SyncClusterConnection.
| virtual string mongo::DBClientInterface::getServerAddress | ( | ) | const [pure virtual] |
Implemented in mongo::DBClientConnection, mongo::DBClientReplicaSet, mongo::SyncClusterConnection, and mongo::DBDirectClient.
| virtual void mongo::DBClientInterface::insert | ( | const string & | ns, | |
| const vector< BSONObj > & | v | |||
| ) | [pure virtual] |
Implemented in mongo::DBClientBase, mongo::DBClientReplicaSet, and mongo::SyncClusterConnection.
| virtual void mongo::DBClientInterface::insert | ( | const string & | ns, | |
| BSONObj | obj | |||
| ) | [pure virtual] |
Implemented in mongo::DBClientBase, mongo::DBClientReplicaSet, and mongo::SyncClusterConnection.
| virtual auto_ptr<DBClientCursor> mongo::DBClientInterface::query | ( | const string & | ns, | |
| Query | query, | |||
| int | nToReturn = 0, |
|||
| int | nToSkip = 0, |
|||
| const BSONObj * | fieldsToReturn = 0, |
|||
| int | queryOptions = 0, |
|||
| int | batchSize = 0 | |||
| ) | [pure virtual] |
Implemented in mongo::DBClientBase, mongo::DBClientConnection, mongo::DBClientReplicaSet, and mongo::SyncClusterConnection.
| virtual void mongo::DBClientInterface::remove | ( | const string & | ns, | |
| Query | query, | |||
| bool | justOne = 0 | |||
| ) | [pure virtual] |
Implemented in mongo::DBClientBase, mongo::DBClientReplicaSet, and mongo::SyncClusterConnection.
| virtual void mongo::DBClientInterface::update | ( | const string & | ns, | |
| Query | query, | |||
| BSONObj | obj, | |||
| bool | upsert = 0, |
|||
| bool | multi = 0 | |||
| ) | [pure virtual] |
Implemented in mongo::DBClientBase, mongo::DBClientReplicaSet, and mongo::SyncClusterConnection.