summaryrefslogtreecommitdiff
path: root/src/mongo/db/views/view.h
diff options
context:
space:
mode:
authorKyle Suarez <kyle.suarez@mongodb.com>2016-07-07 12:19:36 -0400
committerKyle Suarez <kyle.suarez@mongodb.com>2016-07-14 16:04:29 -0400
commitcd91000e5fad86b74afcc550fbd147bac14700f0 (patch)
tree338f703ec56c9ae1df0b71ab325e5e3a8405c942 /src/mongo/db/views/view.h
parent9730e49b06fc9902bf80207c889b919b157b8f35 (diff)
downloadmongo-cd91000e5fad86b74afcc550fbd147bac14700f0.tar.gz
SERVER-24766 aggregation support for views
Users can now run the aggregate command on a view, which will resolve the view to the appropriate collection and run a modified aggregation.
Diffstat (limited to 'src/mongo/db/views/view.h')
-rw-r--r--src/mongo/db/views/view.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/views/view.h b/src/mongo/db/views/view.h
index 446d74dffe1..5238a8638fd 100644
--- a/src/mongo/db/views/view.h
+++ b/src/mongo/db/views/view.h
@@ -71,6 +71,14 @@ public:
return _viewOnNss;
}
+ /**
+ * Returns a vector of BSONObjs that represent the stages of the aggregation pipeline that
+ * defines this view.
+ */
+ const std::vector<BSONObj>& pipeline() const {
+ return _pipeline;
+ }
+
private:
NamespaceString _viewNss;
NamespaceString _viewOnNss;