MCPcopy Create free account
hub / github.com/tortoise/tortoise-orm / rollback

Method rollback

tortoise/backends/psycopg/client.py:245–252  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

243 await self.commit()
244
245 async def rollback(self) -> None:
246 if not self._transaction:
247 raise exceptions.TransactionManagementError("Transaction is in invalid state")
248 if self._finalized:
249 raise exceptions.TransactionManagementError("Transaction already finalised")
250
251 await self._transaction.__aexit__(psycopg.Rollback, psycopg.Rollback(), None)
252 self._finalized = True
253
254 async def savepoint_rollback(self) -> None:
255 await self.rollback()

Callers 1

savepoint_rollbackMethod · 0.95

Calls 1

__aexit__Method · 0.45

Tested by

no test coverage detected