
Public Member Functions | |
| __call ($name, $args) | |
| Forwards the five DBI2 methods to the DBI2 object. | |
| __construct ($parDBI) | |
| Constructor. | |
| __destruct () | |
| Automatically cancels transaction. | |
| addCallback ($cb) | |
| Adds callback to be called when transaction completes. | |
| cancel () | |
| Cancels the transaction. | |
| commit () | |
| Commits the transaction. | |
This class is created by the DBI2::reateTransaction() method. It represent a single, hopefully non-nested transaction. You can call query(), select(), insert(), update() and delete() on it, which function exactly the same as the DBI2 counterparts. When the transaction is finished, call commit() or cancel() to commit or cancel the transaction, respectively. If you do not commit or cancel, the transaction will be automatically cancelled when the transaction object goes out of scope or is to be garbage collected. This prevents locked database connections
Definition at line 355 of file DBI2.php5.
| DBTransaction::__construct | ( | $ | parDBI | ) |
| DBTransaction::__destruct | ( | ) |
| DBTransaction::__call | ( | $ | name, | |
| $ | args | |||
| ) |
Forwards the five DBI2 methods to the DBI2 object.
This is what allows you to call query(), et al. on this transaction object. Those methods have the same arguments on this object as they do on DBI2.
| $name | [string]: name of method | |
| $args | [array]: arguments to method |
Definition at line 393 of file DBI2.php5.
References SObject::setError().
| DBTransaction::addCallback | ( | $ | cb | ) |
Adds callback to be called when transaction completes.
See DBI2::addTransactionCallback() for more information
| $cb | [callback]: callback function |
| DBTransaction::cancel | ( | ) |
Cancels the transaction.
See DBI2::cancelTransaction() for more information
Definition at line 421 of file DBI2.php5.
Referenced by __destruct().
| DBTransaction::commit | ( | ) |
Commits the transaction.
See DBI2::commitTransaction() for more information.
1.5.6