diff options
author | Anton Korshunov <anton.korshunov@mongodb.com> | 2019-05-08 18:01:39 +0100 |
---|---|---|
committer | Anton Korshunov <anton.korshunov@mongodb.com> | 2019-05-14 23:19:33 +0100 |
commit | 089dd83af48cf198916e2dca50742378d4c3d361 (patch) | |
tree | 9b5db698d2624c85c7c19b018d77722470311185 /src/mongo/db/pipeline/mongo_process_interface.h | |
parent | 09db7023065f42ccc39dd3309536726814379c86 (diff) | |
download | mongo-089dd83af48cf198916e2dca50742378d4c3d361.tar.gz |
SERVER-40438 Add merge support for whenNotMatched: fail
Diffstat (limited to 'src/mongo/db/pipeline/mongo_process_interface.h')
-rw-r--r-- | src/mongo/db/pipeline/mongo_process_interface.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/mongo_process_interface.h b/src/mongo/db/pipeline/mongo_process_interface.h index 011b7671776..f36adb1f662 100644 --- a/src/mongo/db/pipeline/mongo_process_interface.h +++ b/src/mongo/db/pipeline/mongo_process_interface.h @@ -42,6 +42,7 @@ #include "mongo/db/generic_cursor.h" #include "mongo/db/matcher/expression.h" #include "mongo/db/namespace_string.h" +#include "mongo/db/ops/write_ops_exec.h" #include "mongo/db/ops/write_ops_parsers.h" #include "mongo/db/pipeline/document.h" #include "mongo/db/pipeline/field_path.h" @@ -141,6 +142,21 @@ public: bool multi, boost::optional<OID> targetEpoch) = 0; + /** + * Updates the documents matching 'queries' with the objects 'updates'. Throws a UserException + * if any of the updates fail. If 'targetEpoch' is set, throws ErrorCodes::StaleEpoch if the + * targeted collection does not have the same epoch, or if the epoch changes during the update. + * Returns a 'WriteResult' object with information about the write operation. + */ + virtual WriteResult updateWithResult(const boost::intrusive_ptr<ExpressionContext>& expCtx, + const NamespaceString& ns, + std::vector<BSONObj>&& queries, + std::vector<write_ops::UpdateModification>&& updates, + const WriteConcernOptions& wc, + bool upsert, + bool multi, + boost::optional<OID> targetEpoch) = 0; + virtual CollectionIndexUsageMap getIndexStats(OperationContext* opCtx, const NamespaceString& ns) = 0; |