diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/dbclient.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/client/dbclient.h b/client/dbclient.h index ea370c4..5ca2b8f 100644 --- a/client/dbclient.h +++ b/client/dbclient.h @@ -106,10 +106,11 @@ namespace mongo { _finishInit(); } - ConnectionString( ConnectionType type , const vector<HostAndPort>& servers ) - : _type( type ) , _servers( servers ){ - _finishInit(); - } + // TODO Delete if nobody is using + //ConnectionString( ConnectionType type , const vector<HostAndPort>& servers ) + // : _type( type ) , _servers( servers ){ + // _finishInit(); + //} ConnectionString( ConnectionType type , const string& s , const string& setName = "" ){ _type = type; @@ -156,6 +157,14 @@ namespace mongo { static ConnectionString parse( const string& url , string& errmsg ); + string getSetName() const{ + return _setName; + } + + vector<HostAndPort> getServers() const { + return _servers; + } + private: ConnectionString(){ @@ -314,7 +323,7 @@ namespace mongo { /** Typically one uses the QUERY(...) macro to construct a Query object. Example: QUERY( "age" << 33 << "school" << "UCLA" ) */ -#define QUERY(x) Query( BSON(x) ) +#define QUERY(x) mongo::Query( BSON(x) ) /** interface that handles communication with the db @@ -1000,7 +1009,7 @@ namespace mongo { virtual void checkResponse( const char *data, int nReturned ) { checkMaster()->checkResponse( data , nReturned ); } protected: - virtual void sayPiggyBack( Message &toSend ) { assert(false); } + virtual void sayPiggyBack( Message &toSend ) { checkMaster()->say( toSend ); } bool isFailed() const { return _currentMaster == 0 || _currentMaster->isFailed(); |