Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Feature] Support Transactions #30

Open
candlecare opened this issue Oct 11, 2019 · 2 comments
Open

[Feature] Support Transactions #30

candlecare opened this issue Oct 11, 2019 · 2 comments

Comments

@candlecare
Copy link

Do you have any plan to support Transactions in mongo-thingy?

https://api.mongodb.com/python/current/api/pymongo/client_session.html#transactions

Thanks.

Sithu

@ramnes
Copy link
Member

ramnes commented Oct 11, 2019

No plan yet as we still didn't switch to MongoDB 4.x, but that would be a great feature indeed!

Supposedly we just have to add a session argument in a few methods and pass it to PyMongo, which is really not much. Pull requests welcome!

@ramnes
Copy link
Member

ramnes commented Jan 12, 2023

API I have in mind at the moment:

with mongo_thingy.Transaction():
    Foo.delete_one()
    Bar().save()

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants