MCPcopy
hub / github.com/ormar-orm/ormar / transaction

Method transaction

ormar/databases/connection.py:123–129  ·  view source on GitHub ↗

Create a transaction context manager. :param force_rollback: If True, always rollback (used for testing)

(self, force_rollback: bool = False)

Source from the content-addressed store, hash-verified

121 yield conn
122
123 def transaction(self, force_rollback: bool = False) -> Transaction:
124 """
125 Create a transaction context manager.
126
127 :param force_rollback: If True, always rollback (used for testing)
128 """
129 return Transaction(self, force_rollback=force_rollback)
130
131 @asynccontextmanager
132 async def get_query_executor(

Calls 1

TransactionClass · 0.90