Class s.d.i.ITransaction(IConnection):

Part of stoqlib.database.interfaces View In Hierarchy

This is an interface that describes a database transaction. It extends the IConnection interface.
Method commit Commits the objects to the database.
Method rollback Undos all the changes made within the current transaction
Method get Fetches an object within the transaction
Method add_modified_object Adds a modified object to the transaction.
Method savepoint Creates a new savepoint
Method rollback_to_savepoint Rollback to a savepoint

Inherited from IConnection:

Method close Drops the connection to the database
def commit(close=False):
Commits the objects to the database. Sends all the modifications of the current objects to the database,
ParameterscloseOptional, if True also closes the database
def rollback(name=None):
Undos all the changes made within the current transaction
ParametersnameIf supplied limit changes to the last savepoint
def get(object):
Fetches an object within the transaction
Parametersobja ORMObject
Returnsa reference to the same object within the transaction
def add_modified_object(object):
Adds a modified object to the transaction. It's used to update TransactionEntry to keep a log of all modified object
ParametersobjectAn ORMObject subclass which should be marked as modified
def savepoint(name):
Creates a new savepoint
Parametersnamename of savepoint
def rollback_to_savepoint(name):
Rollback to a savepoint
Parametersnamename of the savepoint
API Documentation for Stoqlib, generated by pydoctor at 2009-07-14 16:00:32.