summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/query_request.h
diff options
context:
space:
mode:
authorKyle Suarez <kyle.suarez@mongodb.com>2016-07-18 10:51:40 -0400
committerKyle Suarez <kyle.suarez@mongodb.com>2016-07-19 11:14:50 -0400
commitcef83c2fddc2d8cfffa76d3e8680fc6c069e75f3 (patch)
tree8120a74875f92757338615fe20ba1905ba35e65c /src/mongo/db/query/query_request.h
parent97c43492de001c1bfd9426107c919ab50f1829ab (diff)
downloadmongo-cef83c2fddc2d8cfffa76d3e8680fc6c069e75f3.tar.gz
SERVER-24766 find command support for views
Diffstat (limited to 'src/mongo/db/query/query_request.h')
-rw-r--r--src/mongo/db/query/query_request.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/query/query_request.h b/src/mongo/db/query/query_request.h
index cd7fa62f393..01d356a5837 100644
--- a/src/mongo/db/query/query_request.h
+++ b/src/mongo/db/query/query_request.h
@@ -77,6 +77,12 @@ public:
void asFindCommand(BSONObjBuilder* cmdBuilder) const;
/**
+ * Converts this QR into an aggregation using $match. If this QR has options that cannot be
+ * satisfied by aggregation, a non-OK status is returned and 'cmdBuilder' is not modified.
+ */
+ StatusWith<BSONObj> asAggregationCommand() const;
+
+ /**
* Parses maxTimeMS from the BSONElement containing its value.
*/
static StatusWith<int> parseMaxTimeMS(BSONElement maxTimeMSElt);