How to use the transaction.get_transaction function in transaction

To help you get started, we’ve selected a few transaction examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github owenmorris / chandler / chandler / application / repository / Repository.py View on Github external
def __init__(self):
        # Upon first created instance, open the database:
        global _repositoryInitialized, _shared_state
        if not _repositoryInitialized:
            _shared_state = {}

            _storage = FileStorage('_Repository_')
            _db = db.DB(_storage)
            _connection = _db.open()
            _dbroot = _connection.root()

            if not _dbroot.has_key('thingList'):
                _dbroot['thingList'] = PersistentList()
            _shared_state['thingList'] = _dbroot['thingList']
            transaction.get_transaction().commit()

            _repositoryInitialized = True

        self.__dict__ = _shared_state
github scanlime / picogui / apps / nifty / Nifty / Poing / Data.py View on Github external
def save(self):
        transaction.get_transaction().commit()
        print 'Poing db saved'
github owenmorris / chandler / chandler / application / repository / Repository.py View on Github external
def Commit(self):
        """ Commit all ZODB changes.
        """
        transaction.get_transaction().commit()
github scanlime / picogui / pg1 / apps / dev / nifty / Nifty / Poing / db.py View on Github external
def commit(self):
        transaction.get_transaction().commit()
        print 'Poing db saved'
github scanlime / picogui / apps / nifty / Nifty / Poing / db.py View on Github external
def commit(self):
        transaction.get_transaction().commit()
        print 'Poing db saved'
github scanlime / picogui / apps / nifty / Nifty / Poing / db.py View on Github external
def abort(self):
        transaction.get_transaction().abort()