Implements a decorator using a context to handle operations inside a transaction.
See original GitHub issueCreate a decorator like @transaction to handle operation that should ran into a transaction.
Example:
@transaction
def create_charge(self,**kwargs):
# Doing some stuff
Behind the scenes the connection class should run:
connection.begin()
connection.query()
connection.commit()
connection.rollback()
In just one step or rollback all case something gets wrong.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
how to automate manage transactions in SQL Alchemy
SQL Alchemy comes with decorators and context managers to automate transaction management: a transaction (optionally a nested one) is created at ...
Read more >16. Transaction Management - Spring
Declarative transaction management describes support for declarative transaction management. Programmatic transaction management covers support for ...
Read more >Database transactions | Django documentation
A common way to handle transactions on the web is to wrap each request in a transaction. ... in your view code, typically...
Read more >Implementing SQL Transaction management with the Unit of ...
UnitOfWorkTransactionContext class maintains the Connection and Transaction mapping(this class is internally handled by UnitOfWork class). /** * ...
Read more >Patterns for distributed transactions within a microservices ...
Managing distributed transactions across multiple microservices is ... first create a global transaction with all the context information.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Sure. This is really wrapper around what we already have so should be simple 👍
I like that