|
Doctrine 1.2.4
|
Inherits Doctrine_Transaction.
Public Member Functions | |
| addCollection (Doctrine_Collection $coll) | |
| addInvalid (Doctrine_Record $record) | |
| beginInternalTransaction ($savepoint=null) | |
| beginTransaction ($savepoint=null) | |
| commit ($savepoint=null) | |
| getConnection () | |
| getInvalid () | |
| getIsolation () | |
| getModuleName () | |
| getState () | |
| getTransactionLevel () | |
| rollback ($savepoint=null) | |
| setIsolation ($isolation) | |
Data Fields | |
| const | STATE_ACTIVE = 1 |
| const | STATE_BUSY = 2 |
| const | STATE_SLEEP = 0 |
Protected Member Functions | |
| _doBeginTransaction () | |
| _doCommit () | |
| _doRollback () | |
| createSavePoint ($savepoint) | |
| releaseSavePoint ($savepoint) | |
| rollbackSavePoint ($savepoint) | |
|
protectedinherited |
Begins a database transaction.
Definition at line 423 of file Transaction.php.
|
protectedinherited |
Performs the commit.
Definition at line 415 of file Transaction.php.
|
protectedinherited |
Performs the rollback.
Definition at line 407 of file Transaction.php.
|
inherited |
addCollection adds a collection in the internal array of collections
at the end of each commit this array is looped over and of every collection Doctrine then takes a snapshot in order to keep the collections up to date with the database
| Doctrine_Collection | $coll | a collection to be added |
Definition at line 96 of file Transaction.php.
|
inherited |
addInvalid adds record into invalid records list
| Doctrine_Record | $record |
Definition at line 132 of file Transaction.php.
|
inherited |
Initiates a transaction.
This method must only be used by Doctrine itself to initiate transactions. Userland-code must use beginTransaction().
Definition at line 508 of file Transaction.php.
|
inherited |
beginTransaction Start a transaction or set a savepoint.
if trying to set a savepoint and there is no active transaction a new transaction is being started
This method should only be used by userland-code to initiate transactions. To initiate a transaction from inside Doctrine use beginInternalTransaction().
Listeners: onPreTransactionBegin, onTransactionBegin
| string | $savepoint | name of a savepoint to set |
| Doctrine_Transaction_Exception | if the transaction fails at database level |
Definition at line 184 of file Transaction.php.
|
inherited |
Commit the database changes done during a transaction that is in progress or release a savepoint. This function may only be called when auto-committing is disabled, otherwise it will fail.
Listeners: preTransactionCommit, postTransactionCommit
| string | $savepoint | name of a savepoint to release |
| Doctrine_Transaction_Exception | if the transaction fails at database level |
| Doctrine_Validator_Exception | if the transaction fails due to record validations |
Definition at line 236 of file Transaction.php.
|
protected |
|
inherited |
getConnection returns the connection object this module uses
Definition at line 68 of file Module.php.
|
inherited |
Return the invalid records
Definition at line 147 of file Transaction.php.
|
inherited |
getTransactionIsolation
fetches the current session transaction isolation level
note: some drivers may support setting the transaction isolation level but not fetching it
| Doctrine_Transaction_Exception | if the feature is not supported by the driver |
| PDOException | if something fails at the PDO level |
Definition at line 497 of file Transaction.php.
|
inherited |
getModuleName returns the name of this module
Definition at line 79 of file Module.php.
|
inherited |
getState returns the state of this transaction module.
Definition at line 110 of file Transaction.php.
|
inherited |
getTransactionLevel get the current transaction nesting level
Definition at line 158 of file Transaction.php.
|
protected |
|
inherited |
rollback Cancel any database changes done during a transaction or since a specific savepoint that is in progress. This function may only be called when auto-committing is disabled, otherwise it will fail. Therefore, a new transaction is implicitly started after canceling the pending changes.
this method can be listened with onPreTransactionRollback and onTransactionRollback eventlistener methods
| string | $savepoint | name of a savepoint to rollback to |
| Doctrine_Transaction_Exception | if the rollback operation fails at database level |
Definition at line 316 of file Transaction.php.
|
protected |
| Doctrine_Transaction_Pgsql::setIsolation | ( | $isolation | ) |
Set the transacton isolation level.
| string | standard isolation level READ UNCOMMITTED (allows dirty reads) READ COMMITTED (prevents dirty reads) REPEATABLE READ (prevents nonrepeatable reads) SERIALIZABLE (prevents phantom reads) |
| PDOException | if something fails at the PDO level |
| Doctrine_Transaction_Exception | if using unknown isolation level or unknown wait option |
Definition at line 90 of file Pgsql.php.
|
inherited |
Doctrine_Transaction is in active state when it has one active transaction
Definition at line 45 of file Transaction.php.
|
inherited |
Doctrine_Transaction is in busy state when it has multiple active transactions
Definition at line 50 of file Transaction.php.
|
inherited |
Doctrine_Transaction is in sleep state when it has no active transactions
Definition at line 40 of file Transaction.php.