コード例 #1
0
ファイル: db.py プロジェクト: nsi-iff/pyOLS
 def abort_txn(self):
     """ Abort the transaction. """
     if not self._txn:
         raise PyolsProgrammerError("No transaction is active; "
                                    "cannot about a non-existent txn!")
     self._txn.rollback()
     self._txn = None
     objectstore.clear()
コード例 #2
0
ファイル: db.py プロジェクト: nsi-iff/pyOLS
 def abort_txn(self):
     """ Abort the transaction. """
     if not self._txn:
         raise PyolsProgrammerError("No transaction is active; "
                                     "cannot about a non-existent txn!")
     self._txn.rollback()
     self._txn = None
     objectstore.clear()
コード例 #3
0
ファイル: db.py プロジェクト: nsi-iff/pyOLS
 def reset(self):
     """ Clean out and reset the database.
     > db.connect(...)
     > db.create()
     ... add things ...
     > db.reset()
     The db is now at the state it was when create() was called. """
     # Probably only useful during testing...
     objectstore.clear()
     drop_all()
     setup_all(create_tables=True)
コード例 #4
0
ファイル: db.py プロジェクト: nsi-iff/pyOLS
 def reset(self):
     """ Clean out and reset the database.
     > db.connect(...)
     > db.create()
     ... add things ...
     > db.reset()
     The db is now at the state it was when create() was called. """
     # Probably only useful during testing...
     objectstore.clear()
     drop_all()
     setup_all(create_tables=True)