summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/lite_parsed_pipeline.h
diff options
context:
space:
mode:
authorMatthew Russotto <matthew.russotto@10gen.com>2017-06-07 16:43:18 -0400
committerMatthew Russotto <matthew.russotto@10gen.com>2017-06-07 16:45:50 -0400
commitcb187547d18723d1b4e18ffdb069c8cdc53769a8 (patch)
tree44f9f1b5a7b3f3ca7f522e738a2fba1100600e93 /src/mongo/db/pipeline/lite_parsed_pipeline.h
parentf222c3a1c23a9125dfefc81edd3019441d176828 (diff)
downloadmongo-cb187547d18723d1b4e18ffdb069c8cdc53769a8.tar.gz
SERVER-29125 Add $changeNotification stage that always outputs the single last oplog entry, unmodified
This reverts commit b85788f99e2f7d309582bd9d31ffc2769de72405.
Diffstat (limited to 'src/mongo/db/pipeline/lite_parsed_pipeline.h')
-rw-r--r--src/mongo/db/pipeline/lite_parsed_pipeline.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/lite_parsed_pipeline.h b/src/mongo/db/pipeline/lite_parsed_pipeline.h
index c39d9f1031e..ca2e9dfda77 100644
--- a/src/mongo/db/pipeline/lite_parsed_pipeline.h
+++ b/src/mongo/db/pipeline/lite_parsed_pipeline.h
@@ -78,6 +78,13 @@ public:
return !_stageSpecs.empty() && _stageSpecs.front()->isCollStats();
}
+ /**
+ * Returns true if the pipeline begins with a $changeNotification stage.
+ */
+ bool startsWithChangeNotification() const {
+ return !_stageSpecs.empty() && _stageSpecs.front()->isChangeNotification();
+ }
+
private:
std::vector<std::unique_ptr<LiteParsedDocumentSource>> _stageSpecs;
};