diff --git a/driver-core/src/main/com/mongodb/client/model/Updates.java b/driver-core/src/main/com/mongodb/client/model/Updates.java index 82595cc79c8..64b403cb6d9 100644 --- a/driver-core/src/main/com/mongodb/client/model/Updates.java +++ b/driver-core/src/main/com/mongodb/client/model/Updates.java @@ -66,6 +66,17 @@ public static Bson combine(final List updates) { return new CompositeUpdate(updates); } + /** + * Creates an update that sets the values for the document. + * + * @param value the value + * @return the update + * @mongodb.driver.manual reference/operator/update/set/ $set + */ + public static Bson set(final Bson value) { + return new SimpleBsonKeyValue("$set", value); + } + /** * Creates an update that sets the value of the field with the given name to the given value. *