Updates with Aggregation Pipeline for MongoDB >= 4.2 #618
SolardiaX
started this conversation in
Feature Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Starting in MongoDB 4.2, we can use the aggregation pipeline for update operations.
Currently, the UpdateQuery's update_query properties only return Dict[str, Any].
Can we update the update_query method to reuse the update_expressions which is a List as the pipeline, in my test, simple updater also can be used in pipeline.
Fake unit test can be (which will update the ancestor path when move a Category from one level to another, something just like directory move):
Beta Was this translation helpful? Give feedback.
All reactions