(self, exc_type: Any, exc_val: Any, exc_tb: Any)
| 348 | return self.client |
| 349 | |
| 350 | async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None: |
| 351 | try: |
| 352 | if not self.client._finalized: |
| 353 | if exc_type: |
| 354 | # Can't rollback a transaction that already failed. |
| 355 | if exc_type is not TransactionManagementError: |
| 356 | await self.client.rollback() |
| 357 | else: |
| 358 | await self.client.commit() |
| 359 | finally: |
| 360 | if self.client._parent._pool: |
| 361 | await self.client._parent._pool.release(self.client._connection) |
| 362 | get_connections().reset(self.token) |
| 363 | |
| 364 | |
| 365 | class NestedTransactionContext(TransactionContext): |
nothing calls this directly
no test coverage detected