MCPcopy Create free account
hub / github.com/webpy/webpy / subtransaction_engine

Class subtransaction_engine

web/db.py:577–591  ·  view source on GitHub ↗

Transaction Engine used in sub transactions.

Source from the content-addressed store, hash-verified

575 ctx.rollback()
576
577 class subtransaction_engine:
578 """Transaction Engine used in sub transactions."""
579
580 def query(self, q):
581 db_cursor = ctx.db.cursor()
582 ctx.db_execute(db_cursor, SQLQuery(q % transaction_count))
583
584 def do_transact(self):
585 self.query("SAVEPOINT webpy_sp_%s")
586
587 def do_commit(self):
588 self.query("RELEASE SAVEPOINT webpy_sp_%s")
589
590 def do_rollback(self):
591 self.query("ROLLBACK TO SAVEPOINT webpy_sp_%s")
592
593 class dummy_engine:
594 """Transaction Engine used instead of subtransaction_engine

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected