New rollback() method. Not yet used anywhere.
This commit is contained in:
parent
90a31c4e81
commit
a4387ea371
|
@ -120,6 +120,13 @@ class Database( object ):
|
|||
|
||||
connection.pending_saves = []
|
||||
|
||||
def rollback( self ):
|
||||
connection = self.__get_connection()
|
||||
|
||||
# if a transaction has begun but not completed, then rollback the current transaction
|
||||
if connection.get_transaction_status() > 0:
|
||||
connection.rollback()
|
||||
|
||||
def load( self, Object_type, object_id, revision = None ):
|
||||
"""
|
||||
Load the object corresponding to the given object id from the database and return it, or None if
|
||||
|
|
Reference in New Issue