summaryrefslogtreecommitdiff
path: root/src/mongo/db/clientcursor.h
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2015-05-20 13:46:50 -0400
committerDavid Storch <david.storch@10gen.com>2015-05-20 17:29:58 -0400
commitd89e58fd340ced9370d1a39a4334a42a77005f5e (patch)
tree8a20a1f7f506abb6995dc447c4fae9b87a995abf /src/mongo/db/clientcursor.h
parentdefcaffcecef2f3babd4c901e3fdd5573dca39f3 (diff)
downloadmongo-d89e58fd340ced9370d1a39a4334a42a77005f5e.tar.gz
SERVER-16265 add query predicate and aggregation command to the getMore slow query log / profile entries
Diffstat (limited to 'src/mongo/db/clientcursor.h')
-rw-r--r--src/mongo/db/clientcursor.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/clientcursor.h b/src/mongo/db/clientcursor.h
index a94700234d2..f5350ff5707 100644
--- a/src/mongo/db/clientcursor.h
+++ b/src/mongo/db/clientcursor.h
@@ -148,6 +148,7 @@ namespace mongo {
PlanExecutor* getExecutor() const { return _exec.get(); }
int queryOptions() const { return _queryOptions; }
+ const BSONObj& getQuery() const { return _query; }
// Used by ops/query.cpp to stash how many results have been returned by a query.
int pos() const { return _pos; }
@@ -230,7 +231,9 @@ namespace mongo {
// How many objects have been returned by the find() so far?
int _pos;
- // The query that prompted this ClientCursor. Only used for debugging.
+ // If this cursor was created by a find operation, '_query' holds the query predicate for
+ // the find. If this cursor was created by a command (e.g. the aggregate command), then
+ // '_query' holds the command specification received from the client.
BSONObj _query;
// See the QueryOptions enum in dbclient.h