summaryrefslogtreecommitdiff
path: root/src/mongo/db/instance.h
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@10gen.com>2012-02-27 14:46:45 -0500
committerAndy Schwerin <schwerin@10gen.com>2012-03-01 10:30:42 -0500
commit6288c5f13973717a2ec0168f4b28242c0c981bd3 (patch)
tree1dd6b3eee0ec0a85e84db70ca5e9b74ec32e6563 /src/mongo/db/instance.h
parenteed4990236f4e9b5a997f7b4e115df0c25edee97 (diff)
downloadmongo-6288c5f13973717a2ec0168f4b28242c0c981bd3.tar.gz
Promote C++ batch query execution functions to DBClientBase.
There's no good reason I can think of why the batch-processing forms of query() shouldn't be available to all implementations of DBClientBase, and simply optimized for DBClientConnection when exhaust-mode is available on the connection. This change facilitates another optimization, coming soon, which is that DBDirectClient's batch query form can scan all rows rather than issuing a find query when the query parameters are appropriate. This allows for a clever resolution of SERVER-4726, which is really about an unwanted log message.
Diffstat (limited to 'src/mongo/db/instance.h')
-rw-r--r--src/mongo/db/instance.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/instance.h b/src/mongo/db/instance.h
index e57eccd1b5b..cf9698a95da 100644
--- a/src/mongo/db/instance.h
+++ b/src/mongo/db/instance.h
@@ -85,6 +85,8 @@ namespace mongo {
*/
class DBDirectClient : public DBClientBase {
public:
+ using DBClientBase::query;
+
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);
@@ -117,6 +119,9 @@ namespace mongo {
double getSoTimeout() const { return 0; }
virtual bool lazySupported() const { return true; }
+
+ virtual QueryOptions _lookupAvailableOptions();
+
private:
static HostAndPort _clientHost;
};