You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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):
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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