summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_replace_root.cpp
diff options
context:
space:
mode:
authorBernard Gorman <bernard.gorman@gmail.com>2018-06-12 13:35:22 +0100
committerBernard Gorman <bernard.gorman@gmail.com>2018-06-22 04:03:41 +0100
commitc798e34f5479c43da70d5f9f7d4919f16e6dbd50 (patch)
treefa2e47d9c74a26fa01874c9cc76a13f6dbc31dbe /src/mongo/db/pipeline/document_source_replace_root.cpp
parent04d8939bd9c6776da8b7effe9c4bcaa20591d88f (diff)
downloadmongo-c798e34f5479c43da70d5f9f7d4919f16e6dbd50.tar.gz
SERVER-35329 Package agg projection code for use outside of agg execution
Diffstat (limited to 'src/mongo/db/pipeline/document_source_replace_root.cpp')
-rw-r--r--src/mongo/db/pipeline/document_source_replace_root.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/pipeline/document_source_replace_root.cpp b/src/mongo/db/pipeline/document_source_replace_root.cpp
index 6e7ce90cc73..7674a49446c 100644
--- a/src/mongo/db/pipeline/document_source_replace_root.cpp
+++ b/src/mongo/db/pipeline/document_source_replace_root.cpp
@@ -45,8 +45,7 @@ using boost::intrusive_ptr;
/**
* This class implements the transformation logic for the $replaceRoot stage.
*/
-class ReplaceRootTransformation final
- : public DocumentSourceSingleDocumentTransformation::TransformerInterface {
+class ReplaceRootTransformation final : public TransformerInterface {
public:
ReplaceRootTransformation(const boost::intrusive_ptr<ExpressionContext>& expCtx)
@@ -80,15 +79,16 @@ public:
_newRoot->optimize();
}
- Document serializeStageOptions(boost::optional<ExplainOptions::Verbosity> explain) const final {
+ Document serializeTransformation(
+ boost::optional<ExplainOptions::Verbosity> explain) const final {
return Document{{"newRoot", _newRoot->serialize(static_cast<bool>(explain))}};
}
- DocumentSource::GetDepsReturn addDependencies(DepsTracker* deps) const final {
+ DepsTracker::State addDependencies(DepsTracker* deps) const final {
_newRoot->addDependencies(deps);
// This stage will replace the entire document with a new document, so any existing fields
// will be replaced and cannot be required as dependencies.
- return DocumentSource::EXHAUSTIVE_FIELDS;
+ return DepsTracker::State::EXHAUSTIVE_FIELDS;
}
DocumentSource::GetModPathsReturn getModifiedPaths() const final {