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 mixed __construct ( Yiisoft\Db\Connection\ConnectionInterface $connection, Yiisoft\Db\Debug\DatabaseCollector $collector )
$connection Yiisoft\Db\Connection\ConnectionInterface
$collector Yiisoft\Db\Debug\DatabaseCollector

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

            
beginTransaction() public method

public Yiisoft\Db\Transaction\TransactionInterface beginTransaction ( string|null $isolationLevel null )
$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 void close ( )

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

            
createBatchQueryResult() public method

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

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

            
createCommand() public method

public Yiisoft\Db\Command\CommandInterface createCommand ( string|null $sql null, array $params = [] )
$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 Yiisoft\Db\Query\QueryInterface createQuery ( )

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

            
createTransaction() public method

public Yiisoft\Db\Transaction\TransactionInterface createTransaction ( )

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

            
getColumnBuilderClass() public method

public string getColumnBuilderClass ( )

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

            
getColumnFactory() public method

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

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

            
getDriverName() public method

public string getDriverName ( )

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

            
getLastInsertId() public method

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

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

            
getQueryBuilder() public method

public Yiisoft\Db\QueryBuilder\QueryBuilderInterface getQueryBuilder ( )

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

            
getQuoter() public method

public Yiisoft\Db\Schema\QuoterInterface getQuoter ( )

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

            
getSchema() public method

public Yiisoft\Db\Schema\SchemaInterface getSchema ( )

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

            
getServerInfo() public method

public Yiisoft\Db\Connection\ServerInfoInterface getServerInfo ( )

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

            
getTablePrefix() public method

public string getTablePrefix ( )

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

            
getTableSchema() public method

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

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

            
getTransaction() public method

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

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

            
isActive() public method

public boolean isActive ( )

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

            
isSavepointEnabled() public method

public boolean isSavepointEnabled ( )

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

            
open() public method

public void open ( )

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

            
quoteValue() public method

public mixed quoteValue ( mixed $value )
$value mixed

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

            
select() public method

public Yiisoft\Db\Query\QueryInterface select ( array|boolean|float|integer|string|Yiisoft\Db\Expression\ExpressionInterface $columns = [], string|null $option null )
$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 void setEnableSavepoint ( boolean $value )
$value boolean

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

            
setTablePrefix() public method

public void setTablePrefix ( string $value )
$value string

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

            
transaction() public method

public mixed transaction ( Closure $closure, string|null $isolationLevel null )
$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);
}