DbTransaction
in
Represents a transaction to be performed on the database.
Table of Contents
Methods
- commit() : void
- Commits the actions done during a transaction and ends the transaction.
- release() : void
- Releases a specified save point.
- rollback() : void
- Rolls back to the state before a transaction start or to a specified save point.
- save() : void
- Creates a save point in the transaction that can be rolled back to.
Methods
commit()
Commits the actions done during a transaction and ends the transaction.
public
commit() : void
A new transaction will be started if auto-commit is disabled.
Tags
release()
Releases a specified save point.
public
release(string $name) : void
Parameters
- $name : string
-
Name of the save point.
Tags
rollback()
Rolls back to the state before a transaction start or to a specified save point.
public
rollback([string|null $name = null ]) : void
Parameters
- $name : string|null = null
-
Name of the save point, null for the entire transaction.
Tags
save()
Creates a save point in the transaction that can be rolled back to.
public
save(string $name) : void
Parameters
- $name : string
-
Name for the save point.