diff options
author | Anton Korshunov <anton.korshunov@mongodb.com> | 2019-05-06 20:37:22 +0100 |
---|---|---|
committer | Anton Korshunov <anton.korshunov@mongodb.com> | 2019-05-13 21:40:17 +0100 |
commit | dde091c07989ffaefc57705859abf6517beeeace (patch) | |
tree | c5639b56f03fa24f27aeb9e3422617907be6dc77 /src/mongo/db/ops | |
parent | e4b13ae68a4eef9393357038f09f14bfd8102050 (diff) | |
download | mongo-dde091c07989ffaefc57705859abf6517beeeace.tar.gz |
SERVER-40431 Add merge support for whenMatched: pipeline
Diffstat (limited to 'src/mongo/db/ops')
-rw-r--r-- | src/mongo/db/ops/write_ops_parsers.cpp | 3 | ||||
-rw-r--r-- | src/mongo/db/ops/write_ops_parsers.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/ops/write_ops_parsers.cpp b/src/mongo/db/ops/write_ops_parsers.cpp index c15aafce0d0..f6ff83cdad7 100644 --- a/src/mongo/db/ops/write_ops_parsers.cpp +++ b/src/mongo/db/ops/write_ops_parsers.cpp @@ -237,6 +237,9 @@ write_ops::UpdateModification::UpdateModification(const BSONObj& update) { _type = Type::kClassic; } +write_ops::UpdateModification::UpdateModification(std::vector<BSONObj> pipeline) + : _type{Type::kPipeline}, _pipeline{std::move(pipeline)} {} + write_ops::UpdateModification write_ops::UpdateModification::parseFromBSON(BSONElement elem) { return UpdateModification(elem); } diff --git a/src/mongo/db/ops/write_ops_parsers.h b/src/mongo/db/ops/write_ops_parsers.h index f116b79b63e..2058ca4a055 100644 --- a/src/mongo/db/ops/write_ops_parsers.h +++ b/src/mongo/db/ops/write_ops_parsers.h @@ -63,7 +63,7 @@ public: UpdateModification() = default; UpdateModification(BSONElement update); - + UpdateModification(std::vector<BSONObj> pipeline); // This constructor exists only to provide a fast-path for constructing classic-style updates. UpdateModification(const BSONObj& update); |