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
Parameters:
API Tags:
Return: | this object |
Access: | public |
addDelete adds record into pending delete list
Parameters:
API Tags:
addInvalid adds record into invalid records list
Parameters:
API Tags:
Return: | false if record already existed in invalid records list, otherwise true |
Access: | public |
integer beginTransaction(
[string
$savepoint = null]
)
|
|
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
Listeners: onPreTransactionBegin, onTransactionBegin
Parameters:
string |
$savepoint: |
name of a savepoint to set |
API Tags:
Return: | current transaction nesting level |
Access: | public |
Information Tags:
Throws: | Doctrine_Transaction_Exception if the transaction fails at database level |
bulkDelete deletes all records from the pending delete list
API Tags:
boolean commit(
[string
$savepoint = null]
)
|
|
commit 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
Parameters:
string |
$savepoint: |
name of a savepoint to release |
API Tags:
Return: | false if commit couldn't be performed, true otherwise |
Access: | public |
Information Tags:
Throws: | Doctrine_Validator_Exception if the transaction fails due to record validations |
Throws: | Doctrine_Transaction_Exception if the transaction fails at database level |
void createSavePoint(
string
$savepoint
)
|
|
releaseSavePoint creates a new savepoint
Parameters:
string |
$savepoint: |
name of a savepoint to create |
API Tags:
Redefined in descendants as:
returns the pending delete list
API Tags:
getTransactionIsolation
fetches the current session transaction isolation level
note: some drivers may support setting the transaction isolation level but not fetching it
API Tags:
Return: | returns the current session transaction isolation level |
Access: | public |
Information Tags:
Throws: | PDOException if something fails at the PDO level |
Throws: | Doctrine_Transaction_Exception if the feature is not supported by the driver |
Redefined in descendants as:
getState returns the state of this connection
API Tags:
Return: | the connection state |
See: | Doctrine_Connection_Transaction::STATE_* constants |
Access: | public |
integer getTransactionLevel(
)
|
|
getTransactionLevel get the current transaction nesting level
API Tags:
void releaseSavePoint(
string
$savepoint
)
|
|
releaseSavePoint releases given savepoint
Parameters:
string |
$savepoint: |
name of a savepoint to release |
API Tags:
Redefined in descendants as:
integer removeSavePoints(
sring
$savepoint
)
|
|
removeSavePoints removes a savepoint from the internal savePoints array of this transaction object and all its children savepoints
Parameters:
sring |
$savepoint: |
name of the savepoint to remove |
API Tags:
Return: | removed savepoints |
Access: | private |
boolean rollback(
[string
$savepoint = null]
)
|
|
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
Parameters:
string |
$savepoint: |
name of a savepoint to rollback to |
API Tags:
Return: | false if rollback couldn't be performed, true otherwise |
Access: | public |
Information Tags:
Throws: | Doctrine_Transaction_Exception if the rollback operation fails at database level |
void rollbackSavePoint(
string
$savepoint
)
|
|
rollbackSavePoint releases given savepoint
Parameters:
string |
$savepoint: |
name of a savepoint to rollback to |
API Tags:
Redefined in descendants as:
void setIsolation(
string
$isolation
)
|
|
setIsolation
Set the transacton isolation level. (implemented by the connection drivers)
example:
Parameters:
string |
$isolation: |
standard isolation level READ UNCOMMITTED (allows dirty reads) READ COMMITTED (prevents dirty reads) REPEATABLE READ (prevents nonrepeatable reads) SERIALIZABLE (prevents phantom reads) |
API Tags:
Information Tags:
Throws: | PDOException if something fails at the PDO level |
Throws: | Doctrine_Transaction_Exception if the feature is not supported by the driver |
Redefined in descendants as:
getTransactionLevel set the current transaction nesting level
Parameters:
API Tags:
Return: | this object |
Access: | public |