Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Adding more to decorator docs #489

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jocho-here
Copy link

I wasn't able to find a way to properly use the transaction decorator when using with other decorators in the docs.
I thought it would be helpful to add this portion so others can also be aware they need to put the decorator right above the function signature without going into the code and finding out about it themselves.

```python
@router.post("/my-awesome-endpoint")
@database.transaction()
async def awesome_endpoint():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to mention something general that "If using multiple decorators, the @database.transaction() should be the most inner to the function definition. But maybe with better wording 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants