Transaction
class Transaction extends Transaction (View source)
MySQL implementation of \Drupal\Core\Database\Transaction.
Properties
| protected Connection | $connection | The connection object for this transaction. |
from Transaction |
| protected bool | $rolledBack | A boolean value to indicate whether this transaction has been rolled back. |
from Transaction |
| protected string | $name | The name of the transaction. |
from Transaction |
Methods
Details
__construct(Connection $connection, $name = NULL)
No description
__destruct()
No description
name()
Retrieves the name of the transaction or savepoint.
rollBack()
Rolls back the current transaction.
This is just a wrapper method to rollback whatever transaction stack we are currently in, which is managed by the connection object itself. Note that logging (preferable with watchdog_exception()) needs to happen after a transaction has been rolled back or the log messages will be rolled back too.