summaryrefslogtreecommitdiff
path: root/src/mongo/db/update/object_replace_node.h
diff options
context:
space:
mode:
authorTess Avitabile <tess.avitabile@mongodb.com>2017-07-27 11:06:55 -0400
committerTess Avitabile <tess.avitabile@mongodb.com>2017-07-31 14:42:24 -0400
commit3867d603a00888a4cd16d52380233f585db5c0fb (patch)
tree1f1f0485c1348700b2f30531e2fc9039473bdf90 /src/mongo/db/update/object_replace_node.h
parent0a55ace0a362a5944fedbaec2d95b2d7cda750d6 (diff)
downloadmongo-3867d603a00888a4cd16d52380233f585db5c0fb.tar.gz
SERVER-28773 UpdateNode::apply should take a parameter struct
Diffstat (limited to 'src/mongo/db/update/object_replace_node.h')
-rw-r--r--src/mongo/db/update/object_replace_node.h24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/mongo/db/update/object_replace_node.h b/src/mongo/db/update/object_replace_node.h
index c85371828a0..bc626fd0cf3 100644
--- a/src/mongo/db/update/object_replace_node.h
+++ b/src/mongo/db/update/object_replace_node.h
@@ -52,25 +52,13 @@ public:
void setCollator(const CollatorInterface* collator) final {}
/**
- * Replaces the document that 'element' belongs to with '_val'. If '_val' does not contain an
- * _id, the _id from the original document is preserved. 'element' must be the root of the
- * document. 'pathToCreate' and 'pathTaken' must be empty. If 'validateForStorage' is true, the
- * modified document is validated for storage. Throws if any path in 'immutablePaths' is
- * modified (but it may be created if it did not yet exist). Logs the update as a
- * replacement-style update. Always outputs that indexes are affected when the replacement is
- * not a noop.
+ * Replaces the document that 'applyParams.element' belongs to with '_val'. If '_val' does not
+ * contain an _id, the _id from the original document is preserved. 'applyParams.element' must
+ * be the root of the document. 'applyParams.pathToCreate' and 'applyParams.pathTaken' must be
+ * empty. Always returns a result stating that indexes are affected when the replacement is not
+ * a noop.
*/
- void apply(mutablebson::Element element,
- FieldRef* pathToCreate,
- FieldRef* pathTaken,
- StringData matchedField,
- bool fromReplication,
- bool validateForStorage,
- const FieldRefSet& immutablePaths,
- const UpdateIndexData* indexData,
- LogBuilder* logBuilder,
- bool* indexesAffected,
- bool* noop) const final;
+ ApplyResult apply(ApplyParams applyParams) const final;
private:
// Object to replace with.