Final Class Yiisoft\Db\Debug\TransactionInterfaceDecorator
| Inheritance | Yiisoft\Db\Debug\TransactionInterfaceDecorator |
|---|---|
| Implements | Yiisoft\Db\Transaction\TransactionInterface |
Public Methods
Constants
| Constant | Value | Description | Defined By |
|---|---|---|---|
| READ_COMMITTED | 'READ COMMITTED' |
A constant representing the transaction isolation level READ COMMITTED.
|
Yiisoft\Db\Transaction\TransactionInterface |
| READ_UNCOMMITTED | 'READ UNCOMMITTED' |
A constant representing the transaction isolation level READ UNCOMMITTED.
|
Yiisoft\Db\Transaction\TransactionInterface |
| REPEATABLE_READ | 'REPEATABLE READ' |
A constant representing the transaction isolation level REPEATABLE READ.
|
Yiisoft\Db\Transaction\TransactionInterface |
| SERIALIZABLE | 'SERIALIZABLE' |
A constant representing the transaction isolation level SERIALIZABLE.
|
Yiisoft\Db\Transaction\TransactionInterface |
Method Details
| public mixed __construct ( Yiisoft\Db\Transaction\TransactionInterface $decorated, Yiisoft\Db\Debug\DatabaseCollector $collector ) | ||
| $decorated | Yiisoft\Db\Transaction\TransactionInterface | |
| $collector | Yiisoft\Db\Debug\DatabaseCollector | |
public function __construct(
private TransactionInterface $decorated,
private DatabaseCollector $collector,
) {}
| public void begin ( string|null $isolationLevel = null ) | ||
| $isolationLevel | string|null | |
public function begin(?string $isolationLevel = null): void
{
[$callStack] = debug_backtrace();
$this->collector->collectTransactionStart($isolationLevel, $callStack['file'] . ':' . $callStack['line']);
$this->decorated->begin($isolationLevel);
}
| public void commit ( ) |
public function commit(): void
{
[$callStack] = debug_backtrace();
$this->decorated->commit();
$this->collector->collectTransactionCommit($callStack['file'] . ':' . $callStack['line']);
}
| public void createSavepoint ( string $name ) | ||
| $name | string | |
public function createSavepoint(string $name): void
{
$this->decorated->{__FUNCTION__}(...func_get_args());
}
| public integer getLevel ( ) |
public function getLevel(): int
{
return $this->decorated->getLevel();
}
| public boolean isActive ( ) |
public function isActive(): bool
{
return $this->decorated->isActive();
}
| public void releaseSavepoint ( string $name ) | ||
| $name | string | |
public function releaseSavepoint(string $name): void
{
$this->decorated->{__FUNCTION__}(...func_get_args());
}
| public void rollBack ( ) |
public function rollBack(): void
{
[$callStack] = debug_backtrace();
$this->decorated->rollBack();
$this->collector->collectTransactionRollback($callStack['file'] . ':' . $callStack['line']);
}
| public void rollBackSavepoint ( string $name ) | ||
| $name | string | |
public function rollBackSavepoint(string $name): void
{
$this->decorated->{__FUNCTION__}(...func_get_args());
}
| public void setIsolationLevel ( string $level ) | ||
| $level | string | |
public function setIsolationLevel(string $level): void
{
$this->decorated->{__FUNCTION__}(...func_get_args());
}
Signup or Login in order to comment.