summaryrefslogtreecommitdiff
path: root/client/dbclient.h
diff options
context:
space:
mode:
Diffstat (limited to 'client/dbclient.h')
-rw-r--r--client/dbclient.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/client/dbclient.h b/client/dbclient.h
index 2b4bb85..ea55bb4 100644
--- a/client/dbclient.h
+++ b/client/dbclient.h
@@ -721,8 +721,12 @@ namespace mongo {
}
protected:
+ /** if the result of a command is ok*/
bool isOk(const BSONObj&);
+ /** if the element contains a not master error */
+ bool isNotMasterErrorString( const BSONElement& e );
+
BSONObj _countCmd(const string &ns, const BSONObj& query, int options, int limit, int skip );
enum QueryOptions availableOptions();
@@ -892,6 +896,8 @@ namespace mongo {
unsigned long long query( boost::function<void(const BSONObj&)> f, const string& ns, Query query, const BSONObj *fieldsToReturn = 0, int queryOptions = 0);
unsigned long long query( boost::function<void(DBClientCursorBatchIterator&)> f, const string& ns, Query query, const BSONObj *fieldsToReturn = 0, int queryOptions = 0);
+ virtual bool runCommand(const string &dbname, const BSONObj& cmd, BSONObj &info, int options=0);
+
/**
@return true if this connection is currently in a failed state. When autoreconnect is on,
a connection will transition back to an ok state after reconnecting.