summaryrefslogtreecommitdiff
path: root/client/dbclient.h
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2011-01-25 16:18:54 -0500
committerEliot Horowitz <eliot@10gen.com>2011-01-25 16:19:21 -0500
commitfd204c99b376f598893c2622a816ccdc227c469a (patch)
tree3d6faf763302d59b10616011c109a092ef6a0dfe /client/dbclient.h
parent001b3a655a1eb403801430f6937248f0bcd92b28 (diff)
downloadmongo-fd204c99b376f598893c2622a816ccdc227c469a.tar.gz
DBDirectClient uses smart count rather than going over message api
Diffstat (limited to 'client/dbclient.h')
-rw-r--r--client/dbclient.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/client/dbclient.h b/client/dbclient.h
index 05160105db0..b731604aca8 100644
--- a/client/dbclient.h
+++ b/client/dbclient.h
@@ -433,7 +433,7 @@ namespace mongo {
/** count number of objects in collection ns that match the query criteria specified
throws UserAssertion if database returns an error
*/
- unsigned long long count(const string &ns, const BSONObj& query = BSONObj(), int options=0, int limit=0, int skip=0 );
+ virtual unsigned long long count(const string &ns, const BSONObj& query = BSONObj(), int options=0, int limit=0, int skip=0 );
string createPasswordDigest( const string &username , const string &clearTextPassword );
@@ -700,6 +700,8 @@ namespace mongo {
protected:
bool isOk(const BSONObj&);
+ BSONObj _countCmd(const string &ns, const BSONObj& query, int options, int limit, int skip );
+
enum QueryOptions availableOptions();
private: