java.lang.Object
net.pincette.mongo.Patch
Support for MongoDB updates.
- Since:
- 2.1
- Author:
- Werner Donné
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stream<JsonObject>updateOperators(JsonObject original, Stream<JsonObject> patch) Creates a stream of update operators from a JSON patch, with which a MongoDB document can be updated using a bulk write.static JsonArrayupdateOperators(JsonObject original, JsonArray patch) Creates an array of update operators from a JSON patch, with which a MongoDB document can be updated using a bulk write.updateOperators(JsonObject original, JsonPatch patch) Creates a list of update operators from a JSON patch, with which a MongoDB document can be updated using a bulk write.
-
Method Details
-
updateOperators
Creates a list of update operators from a JSON patch, with which a MongoDB document can be updated using a bulk write. Root paths are not supported. You can use a plain update for that.- Parameters:
original- the JSON object that will be updated.patch- the JSON patch.- Returns:
- The generated aggregation pipeline.
- Since:
- 2.1
-
updateOperators
Creates an array of update operators from a JSON patch, with which a MongoDB document can be updated using a bulk write. Root paths are not supported. You can use a plain update for that.- Parameters:
original- the JSON object that will be updated.patch- the JSON patch.- Returns:
- The generated aggregation pipeline.
- Since:
- 2.1
-
updateOperators
Creates a stream of update operators from a JSON patch, with which a MongoDB document can be updated using a bulk write. Root paths are not supported. You can use a plain update for that.- Parameters:
original- the JSON object that will be updated.patch- the JSON patch.- Returns:
- The generated aggregation pipeline.
- Since:
- 2.1
-