MariaDbTransaction
in package
implements
DbTransaction
Represents a MariaDB transaction.
Table of Contents
Interfaces
- DbTransaction
- Represents a transaction to be performed on the database.
Methods
- __construct() : mixed
- 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
__construct()
public
__construct(MariaDbConnection $conn, mysqli $connRaw) : mixed
Parameters
- $conn : MariaDbConnection
-
Underlying connection
- $connRaw : mysqli
-
Underlying connection (off vocal)
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.
release()
Releases a specified save point.
public
release(string $name) : void
Parameters
- $name : string
-
Name of the save point.
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.
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.