ManagesTransactions
trait ManagesTransactions
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.
Rollback the active database transaction.
Perform a rollback within the database.
Get the number of active transactions.
Details
at line 20
mixed
transaction(Closure $callback, int $attempts = 1)
Execute a Closure within a transaction.
at line 59
protected void
handleTransactionException(Exception $e, int $currentAttempt, int $maxAttempts)
Handle an exception encountered when running a transacted statement.
at line 90
void
beginTransaction()
Start a new database transaction.
at line 104
protected void
createTransaction()
Create a transaction within the database.
at line 122
protected void
createSavepoint()
Create a save point within the database.
at line 137
protected void
handleBeginTransactionException(Exception $e)
Handle an exception from a transaction beginning.
at line 153
void
commit()
Commit the active database transaction.
at line 170
void
rollBack(int|null $toLevel = null)
Rollback the active database transaction.
at line 199
protected void
performRollBack(int $toLevel)
Perform a rollback within the database.
at line 215
int
transactionLevel()
Get the number of active transactions.