0 follower

Final Class Yiisoft\Db\Debug\ConnectionInterfaceProxy

InheritanceYiisoft\Db\Debug\ConnectionInterfaceProxy
ImplementsYiisoft\Db\Connection\ConnectionInterface

Public Methods

Hide inherited methods

Method Description Defined By
__construct() Yiisoft\Db\Debug\ConnectionInterfaceProxy
beginTransaction() Yiisoft\Db\Debug\ConnectionInterfaceProxy
close() Yiisoft\Db\Debug\ConnectionInterfaceProxy
createBatchQueryResult() Yiisoft\Db\Debug\ConnectionInterfaceProxy
createCommand() Yiisoft\Db\Debug\ConnectionInterfaceProxy
createQuery() Yiisoft\Db\Debug\ConnectionInterfaceProxy
createTransaction() Yiisoft\Db\Debug\ConnectionInterfaceProxy
getColumnBuilderClass() Yiisoft\Db\Debug\ConnectionInterfaceProxy
getColumnFactory() Yiisoft\Db\Debug\ConnectionInterfaceProxy
getDriverName() Yiisoft\Db\Debug\ConnectionInterfaceProxy
getLastInsertId() Yiisoft\Db\Debug\ConnectionInterfaceProxy
getQueryBuilder() Yiisoft\Db\Debug\ConnectionInterfaceProxy
getQuoter() Yiisoft\Db\Debug\ConnectionInterfaceProxy
getSchema() Yiisoft\Db\Debug\ConnectionInterfaceProxy
getServerInfo() Yiisoft\Db\Debug\ConnectionInterfaceProxy
getTablePrefix() Yiisoft\Db\Debug\ConnectionInterfaceProxy
getTableSchema() Yiisoft\Db\Debug\ConnectionInterfaceProxy
getTransaction() Yiisoft\Db\Debug\ConnectionInterfaceProxy
isActive() Yiisoft\Db\Debug\ConnectionInterfaceProxy
isSavepointEnabled() Yiisoft\Db\Debug\ConnectionInterfaceProxy
open() Yiisoft\Db\Debug\ConnectionInterfaceProxy
quoteValue() Yiisoft\Db\Debug\ConnectionInterfaceProxy
select() Yiisoft\Db\Debug\ConnectionInterfaceProxy
setEnableSavepoint() Yiisoft\Db\Debug\ConnectionInterfaceProxy
setTablePrefix() Yiisoft\Db\Debug\ConnectionInterfaceProxy
transaction() Yiisoft\Db\Debug\ConnectionInterfaceProxy

Method Details

Hide inherited methods

__construct() public method

public __construct( Yiisoft\Db\Connection\ConnectionInterface $connection, Yiisoft\Db\Debug\DatabaseCollector $collector ): mixed
$connection Yiisoft\Db\Connection\ConnectionInterface
$collector Yiisoft\Db\Debug\DatabaseCollector

                public function __construct(
    private ConnectionInterface $connection,
    private DatabaseCollector $collector,
) {}

            
beginTransaction() public method

public beginTransaction( string|null $isolationLevel null ): Yiisoft\Db\Transaction\TransactionInterface
$isolationLevel string|null

                public function beginTransaction(?string $isolationLevel = null): TransactionInterface
{
    [$callStack] = debug_backtrace();
    $result = $this->connection->beginTransaction($isolationLevel);
    $this->collector->collectTransactionStart($isolationLevel, $callStack['file'] . ':' . $callStack['line']);
    return new TransactionInterfaceDecorator($result, $this->collector);
}

            
close() public method

public close( ): void

                public function close(): void
{
    $this->connection->close();
}

            
createBatchQueryResult() public method

public createBatchQueryResult( Yiisoft\Db\Query\QueryInterface $query ): Yiisoft\Db\Query\BatchQueryResultInterface
$query Yiisoft\Db\Query\QueryInterface

                public function createBatchQueryResult(QueryInterface $query): BatchQueryResultInterface
{
    return $this->connection->createBatchQueryResult($query);
}

            
createCommand() public method

public createCommand( string|null $sql null, array $params = [] ): Yiisoft\Db\Command\CommandInterface
$sql string|null
$params array

                public function createCommand(?string $sql = null, array $params = []): CommandInterface
{
    return new CommandInterfaceProxy(
        $this->connection->createCommand($sql, $params),
        $this->collector,
    );
}

            
createQuery() public method

public createQuery( ): Yiisoft\Db\Query\QueryInterface

                public function createQuery(): QueryInterface
{
    return $this->connection->createQuery();
}

            
createTransaction() public method

public createTransaction( ): Yiisoft\Db\Transaction\TransactionInterface

                public function createTransaction(): TransactionInterface
{
    return new TransactionInterfaceDecorator(
        $this->connection->createTransaction(),
        $this->collector,
    );
}

            
getColumnBuilderClass() public method

public getColumnBuilderClass( ): string

                public function getColumnBuilderClass(): string
{
    return $this->connection->getColumnBuilderClass();
}

            
getColumnFactory() public method

public getColumnFactory( ): Yiisoft\Db\Schema\Column\ColumnFactoryInterface

                public function getColumnFactory(): ColumnFactoryInterface
{
    return $this->connection->getColumnFactory();
}

            
getDriverName() public method

public getDriverName( ): string

                public function getDriverName(): string
{
    return $this->connection->getDriverName();
}

            
getLastInsertId() public method

public getLastInsertId( string|null $sequenceName null ): string
$sequenceName string|null

                public function getLastInsertId(?string $sequenceName = null): string
{
    return $this->connection->getLastInsertId($sequenceName);
}

            
getQueryBuilder() public method

public getQueryBuilder( ): Yiisoft\Db\QueryBuilder\QueryBuilderInterface

                public function getQueryBuilder(): QueryBuilderInterface
{
    return $this->connection->getQueryBuilder();
}

            
getQuoter() public method

public getQuoter( ): Yiisoft\Db\Schema\QuoterInterface

                public function getQuoter(): QuoterInterface
{
    return $this->connection->getQuoter();
}

            
getSchema() public method

public getSchema( ): Yiisoft\Db\Schema\SchemaInterface

                public function getSchema(): SchemaInterface
{
    return $this->connection->getSchema();
}

            
getServerInfo() public method

public getServerInfo( ): Yiisoft\Db\Connection\ServerInfoInterface

                public function getServerInfo(): ServerInfoInterface
{
    return $this->connection->getServerInfo();
}

            
getTablePrefix() public method

public getTablePrefix( ): string

                public function getTablePrefix(): string
{
    return $this->connection->getTablePrefix();
}

            
getTableSchema() public method

public getTableSchema( string $name, boolean $refresh false ): Yiisoft\Db\Schema\TableSchemaInterface|null
$name string
$refresh boolean

                public function getTableSchema(string $name, bool $refresh = false): ?TableSchemaInterface
{
    return $this->connection->getTableSchema($name, $refresh);
}

            
getTransaction() public method

public getTransaction( ): Yiisoft\Db\Transaction\TransactionInterface|null

                public function getTransaction(): ?TransactionInterface
{
    $result = $this->connection->getTransaction();
    return $result === null
        ? null
        : new TransactionInterfaceDecorator(
            $result,
            $this->collector,
        );
}

            
isActive() public method

public isActive( ): boolean

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

            
isSavepointEnabled() public method

public isSavepointEnabled( ): boolean

                public function isSavepointEnabled(): bool
{
    return $this->connection->isSavepointEnabled();
}

            
open() public method

public open( ): void

                public function open(): void
{
    $this->connection->open();
}

            
quoteValue() public method

public quoteValue( mixed $value ): mixed
$value mixed

                public function quoteValue(mixed $value): mixed
{
    return $this->connection->quoteValue($value);
}

            
select() public method

public select( array|boolean|float|integer|string|Yiisoft\Db\Expression\ExpressionInterface $columns = [], string|null $option null ): Yiisoft\Db\Query\QueryInterface
$columns array|boolean|float|integer|string|Yiisoft\Db\Expression\ExpressionInterface
$option string|null

                public function select(
    array|bool|float|int|string|ExpressionInterface $columns = [],
    ?string $option = null,
): QueryInterface {
    return $this->connection->select($columns, $option);
}

            
setEnableSavepoint() public method

public setEnableSavepoint( boolean $value ): void
$value boolean

                public function setEnableSavepoint(bool $value): void
{
    $this->connection->setEnableSavepoint($value);
}

            
setTablePrefix() public method

public setTablePrefix( string $value ): void
$value string

                public function setTablePrefix(string $value): void
{
    $this->connection->setTablePrefix($value);
}

            
transaction() public method

public transaction( Closure $closure, string|null $isolationLevel null ): mixed
$closure Closure
$isolationLevel string|null

                public function transaction(Closure $closure, ?string $isolationLevel = null): mixed
{
    [$callStack] = debug_backtrace();
    $this->collector->collectTransactionStart($isolationLevel, $callStack['file'] . ':' . $callStack['line']);
    return $this->connection->transaction(fn(): mixed => $closure($this), $isolationLevel);
}