Previous section To contents

14.10.3 Transactions

Transactions make it possible to alter, add or delete several database records and guarantee that all changes, or no changes, will be accepted by the database. A transaction object is basically a table object with a few restrictions and additions, listed below:

Rollbacks always succeeds. However, with commit that is not always the case. A commit will fail if:

METHOD
Yabu.transaction.commit - Commit a transaction

SYNTAX
void commit();

DESCRIPTION
This method commits the changes made in a transaction. If a record affected by the transaction is altered during the transaction, a conflict will arise and an error is thrown.

SEE ALSO
Yabu.table->transaction and Yabu.transaction->rollback

METHOD
Yabu.transaction.rollback - Rollback a transaction

SYNTAX
void rollback();

DESCRIPTION
This method cancels a transaction. All changes made in the transaction are lost.

SEE ALSO
Yabu.table->transaction and Yabu.transaction->commit


Previous section To contents