Add Support to findAndModify method #660
Closed
b564518128
started this conversation in
Feature Request
Replies: 1 comment
-
in discussion #530 it mentioned that all changing method should return the instance. It seems that it's not the case. I would like to see those pymongo/motor methods above implemented as they would be a quite useful tool to implement auto-incrementing document id. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Add support for findAndModify functionality so that a Document can be retrieved and updated in one operation.
In PyMongo and Motor, this functionality is achieved with
find_one_and_delete
,find_one_and_update
,find_one_and_replace
,find_many_and_delete
,find_many_and_update
andfind_many_and_replace
methods.https://motor.readthedocs.io/en/stable/api-asyncio/asyncio_motor_collection.html#motor.motor_asyncio.AsyncIOMotorCollection.find_one_and_update
Beta Was this translation helpful? Give feedback.
All reactions