ManagesTransactions
trait ManagesTransactions mixin Connection
Methods
Handle an exception encountered when running a transacted statement.
Start a new database transaction.
Create a transaction within the database.
Create a save point within the database.
Commit the active database transaction.
Commit the active physical transaction.
Handle an exception encountered when committing a transaction.
Rollback the active database transaction.
Detach transaction records and physical connection references.
Get the number of active transactions.
Execute the callback after a transaction commits.
Execute the callback after a transaction rolls back.
Details
at line 29
mixed
transaction(Closure $callback, int $attempts = 1)
No description
at line 109
protected void
handleTransactionException(Throwable $e, int $currentAttempt, int $maxAttempts)
Handle an exception encountered when running a transacted statement.
at line 163
void
beginTransaction()
Start a new database transaction.
at line 197
protected void
createTransaction()
Create a transaction within the database.
at line 217
protected void
createSavepoint()
Create a save point within the database.
at line 229
protected void
handleBeginTransactionException(Throwable $e)
Handle an exception from a transaction beginning.
at line 245
void
commit()
Commit the active database transaction.
at line 283
protected void
performCommit()
Commit the active physical transaction.
at line 306
protected void
handleCommitTransactionException(Throwable $e, int $currentAttempt, int $maxAttempts)
Handle an exception encountered when committing a transaction.
at line 340
void
rollBack(int|null $toLevel = null)
Rollback the active database transaction.
at line 398
protected void
performRollBack(int $toLevel, PDO $pdo)
Perform a rollback within the database.
at line 416
protected void
handleRollBackException(Throwable $e)
Handle an exception from a rollback.
at line 432
protected void
terminateTransactionState()
Detach transaction records and physical connection references.
at line 453
int
transactionLevel()
Get the number of active transactions.
at line 463
void
afterCommit(callable $callback)
Execute the callback after a transaction commits.
at line 479
void
afterRollBack(callable $callback)
Execute the callback after a transaction rolls back.