TransactionsHandler
class TransactionsHandler implements ITransactions (View source)
Properties
| static protected int | $transactionCounter | ||
| static protected bool | $inTransaction | ||
| static protected IConnection | $instance |
Methods
No description
This function creates a new transaction, in order to be able to commit or rollback changes made to the database.
This function commits any changes made to the database during this transaction.
This function returns the last ID generated by an auto-increment column, either the last one inserted during the current transaction, or by passing in the optional name parameter.
This function rolls back any changes made to the database during this transaction and restores the data to its original state.
Details
__construct(IConnection $instance)
No description
IConnection
getInstance()
No description
bool
beginTransaction()
This function creates a new transaction, in order to be able to commit or rollback changes made to the database.
bool
commit()
This function commits any changes made to the database during this transaction.
bool
inTransaction()
This function returns the last ID generated by an auto-increment column, either the last one inserted during the current transaction, or by passing in the optional name parameter.
bool
rollback()
This function rolls back any changes made to the database during this transaction and restores the data to its original state.