sync
This commit is contained in:
15
api/application/abstractions/transaction.py
Normal file
15
api/application/abstractions/transaction.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from typing import Protocol
|
||||
|
||||
|
||||
class TransactionContextManager(Protocol):
|
||||
async def __aenter__(self):
|
||||
raise NotImplementedError
|
||||
|
||||
async def __aexit__(self, exc_type, exc_val, exc_tb):
|
||||
raise NotImplementedError
|
||||
|
||||
async def commit(self):
|
||||
raise NotImplementedError
|
||||
|
||||
async def rollback(self):
|
||||
raise NotImplementedError
|
Reference in New Issue
Block a user