This commit is contained in:
2024-04-21 21:02:50 +00:00
parent 2ca7787dcb
commit 12d61e01e1
2 changed files with 17 additions and 1 deletions

View 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