File:  [Repository] / ExtFile / transaction_.py
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Wed Jan 24 16:53:50 2007 UTC (17 years, 5 months ago) by dwinter
Branches: first, MAIN
CVS tags: release, HEAD
Auf der Basis http://www.zope.org/Members/shh/ExtFile Version 1.5.4

mit zlog ersetzt durch logging


    1: #
    2: # Zope 2.8-style transactions for Zope <= 2.7.
    3: #
    4: 
    5: # $Id: transaction_.py,v 1.1.1.1 2007/01/24 16:53:50 dwinter Exp $
    6: 
    7: def get():
    8:     return get_transaction()
    9: 
   10: def begin():
   11:     get_transaction().begin()
   12: 
   13: def commit(sub=0):
   14:     get_transaction().commit(sub)
   15: 
   16: def abort(sub=0):
   17:     get_transaction().abort(sub)
   18: 
   19: def savepoint(optimistic=0):
   20:     get_transaction().commit(1)
   21:     return DummySavePoint()
   22: 
   23: class DummySavePoint:
   24:     valid = 0
   25:     def rollback(self):
   26:         raise RuntimeError, 'Rollback of dummy savepoint'

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>