0 follower

Final Class Yiisoft\Db\Debug\TransactionInterfaceDecorator

InheritanceYiisoft\Db\Debug\TransactionInterfaceDecorator
ImplementsYiisoft\Db\Transaction\TransactionInterface

Constants

Hide inherited 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

Hide inherited methods

__construct() public method

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,
) {}

            
begin() public method

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);
}

            
commit() public method

public void commit ( )

                public function commit(): void
{
    [$callStack] = debug_backtrace();
    $this->decorated->commit();
    $this->collector->collectTransactionCommit($callStack['file'] . ':' . $callStack['line']);
}

            
createSavepoint() public method

public void createSavepoint ( string $name )
$name string

                public function createSavepoint(string $name): void
{
    $this->decorated->{__FUNCTION__}(...func_get_args());
}

            
getLevel() public method

public integer getLevel ( )

                public function getLevel(): int
{
    return $this->decorated->getLevel();
}

            
isActive() public method

public boolean isActive ( )

                public function isActive(): bool
{
    return $this->decorated->isActive();
}

            
releaseSavepoint() public method

public void releaseSavepoint ( string $name )
$name string

                public function releaseSavepoint(string $name): void
{
    $this->decorated->{__FUNCTION__}(...func_get_args());
}

            
rollBack() public method

public void rollBack ( )

                public function rollBack(): void
{
    [$callStack] = debug_backtrace();
    $this->decorated->rollBack();
    $this->collector->collectTransactionRollback($callStack['file'] . ':' . $callStack['line']);
}

            
rollBackSavepoint() public method

public void rollBackSavepoint ( string $name )
$name string

                public function rollBackSavepoint(string $name): void
{
    $this->decorated->{__FUNCTION__}(...func_get_args());
}

            
setIsolationLevel() public method

public void setIsolationLevel ( string $level )
$level string

                public function setIsolationLevel(string $level): void
{
    $this->decorated->{__FUNCTION__}(...func_get_args());
}