Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Implement aio_transaction method #303

Open
kalombos opened this issue Oct 25, 2024 · 0 comments
Open

Implement aio_transaction method #303

kalombos opened this issue Oct 25, 2024 · 0 comments

Comments

@kalombos
Copy link
Collaborator

kalombos commented Oct 25, 2024

Implement aio_transaction method similar to sync version but not returns transaction object and raises exception for netsted transactions:

async with db.aio_transaction():
    await TestModel.aio_create(text='FOO2', data="")     

    async with db.aio_transaction(): # alarm, alarm nested transaction raising exception
        await TestModel.aio_create(text='FOO3', data="not_created")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant