summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_change_stream.h
diff options
context:
space:
mode:
authorMatthew Russotto <matthew.russotto@10gen.com>2017-08-30 15:57:55 -0400
committerMatthew Russotto <matthew.russotto@10gen.com>2017-08-30 16:21:45 -0400
commit49489604c381bd805a4f4193fa656e7d41ba770f (patch)
treee7c4c00bcd94f604ae584cdb314ac898e0c198d6 /src/mongo/db/pipeline/document_source_change_stream.h
parent34621e09900e3888b8b4101c9a806cf21c9eed19 (diff)
downloadmongo-49489604c381bd805a4f4193fa656e7d41ba770f.tar.gz
SERVER-30438 Turn on OPLOG_REPLAY for the change notification query.
Diffstat (limited to 'src/mongo/db/pipeline/document_source_change_stream.h')
-rw-r--r--src/mongo/db/pipeline/document_source_change_stream.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/document_source_change_stream.h b/src/mongo/db/pipeline/document_source_change_stream.h
index c831ec16c50..1b637abbd6c 100644
--- a/src/mongo/db/pipeline/document_source_change_stream.h
+++ b/src/mongo/db/pipeline/document_source_change_stream.h
@@ -29,6 +29,7 @@
#pragma once
#include "mongo/db/pipeline/document_source.h"
+#include "mongo/db/pipeline/document_source_match.h"
#include "mongo/db/pipeline/document_source_single_document_transformation.h"
#include "mongo/db/pipeline/document_sources_gen.h"
@@ -150,4 +151,23 @@ private:
DocumentSourceChangeStream() = default;
};
+/**
+ * A custom subclass of DocumentSourceMatch which does not serialize itself (since it came from an
+ * alias) and requires itself to be the first stage in the pipeline.
+ */
+class DocumentSourceOplogMatch final : public DocumentSourceMatch {
+public:
+ static boost::intrusive_ptr<DocumentSourceOplogMatch> create(
+ BSONObj filter, const boost::intrusive_ptr<ExpressionContext>& expCtx);
+
+ const char* getSourceName() const final;
+
+ StageConstraints constraints() const final;
+
+ Value serialize(boost::optional<ExplainOptions::Verbosity> explain) const final;
+
+private:
+ DocumentSourceOplogMatch(BSONObj filter, const boost::intrusive_ptr<ExpressionContext>& expCtx);
+};
+
} // namespace mongo