0 follower

Final Class Yiisoft\Db\Debug\CommandInterfaceProxy

InheritanceYiisoft\Db\Debug\CommandInterfaceProxy
ImplementsYiisoft\Db\Command\CommandInterface

Public Methods

Hide inherited methods

Method Description Defined By
__construct() Yiisoft\Db\Debug\CommandInterfaceProxy
addCheck() Yiisoft\Db\Debug\CommandInterfaceProxy
addColumn() Yiisoft\Db\Debug\CommandInterfaceProxy
addCommentOnColumn() Yiisoft\Db\Debug\CommandInterfaceProxy
addCommentOnTable() Yiisoft\Db\Debug\CommandInterfaceProxy
addDefaultValue() Yiisoft\Db\Debug\CommandInterfaceProxy
addForeignKey() Yiisoft\Db\Debug\CommandInterfaceProxy
addPrimaryKey() Yiisoft\Db\Debug\CommandInterfaceProxy
addUnique() Yiisoft\Db\Debug\CommandInterfaceProxy
alterColumn() Yiisoft\Db\Debug\CommandInterfaceProxy
bindParam() Yiisoft\Db\Debug\CommandInterfaceProxy
bindValue() Yiisoft\Db\Debug\CommandInterfaceProxy
bindValues() Yiisoft\Db\Debug\CommandInterfaceProxy
cancel() Yiisoft\Db\Debug\CommandInterfaceProxy
checkIntegrity() Yiisoft\Db\Debug\CommandInterfaceProxy
createIndex() Yiisoft\Db\Debug\CommandInterfaceProxy
createTable() Yiisoft\Db\Debug\CommandInterfaceProxy
createView() Yiisoft\Db\Debug\CommandInterfaceProxy
delete() Yiisoft\Db\Debug\CommandInterfaceProxy
dropCheck() Yiisoft\Db\Debug\CommandInterfaceProxy
dropColumn() Yiisoft\Db\Debug\CommandInterfaceProxy
dropCommentFromColumn() Yiisoft\Db\Debug\CommandInterfaceProxy
dropCommentFromTable() Yiisoft\Db\Debug\CommandInterfaceProxy
dropDefaultValue() Yiisoft\Db\Debug\CommandInterfaceProxy
dropForeignKey() Yiisoft\Db\Debug\CommandInterfaceProxy
dropIndex() Yiisoft\Db\Debug\CommandInterfaceProxy
dropPrimaryKey() Yiisoft\Db\Debug\CommandInterfaceProxy
dropTable() Yiisoft\Db\Debug\CommandInterfaceProxy
dropUnique() Yiisoft\Db\Debug\CommandInterfaceProxy
dropView() Yiisoft\Db\Debug\CommandInterfaceProxy
execute() Yiisoft\Db\Debug\CommandInterfaceProxy
getParams() Yiisoft\Db\Debug\CommandInterfaceProxy
getRawSql() Yiisoft\Db\Debug\CommandInterfaceProxy
getSql() Yiisoft\Db\Debug\CommandInterfaceProxy
insert() Yiisoft\Db\Debug\CommandInterfaceProxy
insertBatch() Yiisoft\Db\Debug\CommandInterfaceProxy
insertReturningPks() Yiisoft\Db\Debug\CommandInterfaceProxy
prepare() Yiisoft\Db\Debug\CommandInterfaceProxy
query() Yiisoft\Db\Debug\CommandInterfaceProxy
queryAll() Yiisoft\Db\Debug\CommandInterfaceProxy
queryColumn() Yiisoft\Db\Debug\CommandInterfaceProxy
queryOne() Yiisoft\Db\Debug\CommandInterfaceProxy
queryScalar() Yiisoft\Db\Debug\CommandInterfaceProxy
renameColumn() Yiisoft\Db\Debug\CommandInterfaceProxy
renameTable() Yiisoft\Db\Debug\CommandInterfaceProxy
resetSequence() Yiisoft\Db\Debug\CommandInterfaceProxy
setRawSql() Yiisoft\Db\Debug\CommandInterfaceProxy
setRetryHandler() Yiisoft\Db\Debug\CommandInterfaceProxy
setSql() Yiisoft\Db\Debug\CommandInterfaceProxy
showDatabases() Yiisoft\Db\Debug\CommandInterfaceProxy
truncateTable() Yiisoft\Db\Debug\CommandInterfaceProxy
update() Yiisoft\Db\Debug\CommandInterfaceProxy
upsert() Yiisoft\Db\Debug\CommandInterfaceProxy
upsertReturning() Yiisoft\Db\Debug\CommandInterfaceProxy
upsertReturningPks() Yiisoft\Db\Debug\CommandInterfaceProxy
withDbTypecasting() Yiisoft\Db\Debug\CommandInterfaceProxy
withPhpTypecasting() Yiisoft\Db\Debug\CommandInterfaceProxy
withTypecasting() Yiisoft\Db\Debug\CommandInterfaceProxy

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( Yiisoft\Db\Command\CommandInterface $decorated, Yiisoft\Db\Debug\DatabaseCollector $collector )
$decorated Yiisoft\Db\Command\CommandInterface
$collector Yiisoft\Db\Debug\DatabaseCollector

                public function __construct(
    private CommandInterface $decorated,
    private DatabaseCollector $collector,
) {}

            
addCheck() public method

public static addCheck ( string $table, string $name, string $expression )
$table string
$name string
$expression string

                public function addCheck(string $table, string $name, string $expression): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
addColumn() public method

public static addColumn ( string $table, string $column, Yiisoft\Db\Schema\Column\ColumnInterface|string $type )
$table string
$column string
$type Yiisoft\Db\Schema\Column\ColumnInterface|string

                public function addColumn(string $table, string $column, ColumnInterface|string $type): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
addCommentOnColumn() public method

public static addCommentOnColumn ( string $table, string $column, string $comment )
$table string
$column string
$comment string

                public function addCommentOnColumn(string $table, string $column, string $comment): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
addCommentOnTable() public method

public static addCommentOnTable ( string $table, string $comment )
$table string
$comment string

                public function addCommentOnTable(string $table, string $comment): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
addDefaultValue() public method

public static addDefaultValue ( string $table, string $name, string $column, mixed $value )
$table string
$name string
$column string
$value mixed

                public function addDefaultValue(string $table, string $name, string $column, mixed $value): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
addForeignKey() public method

public static addForeignKey ( string $table, string $name, array|string $columns, string $referenceTable, array|string $referenceColumns, ?string $delete null, ?string $update null )
$table string
$name string
$columns array|string
$referenceTable string
$referenceColumns array|string
$delete ?string
$update ?string

                public function addForeignKey(
    string $table,
    string $name,
    array|string $columns,
    string $referenceTable,
    array|string $referenceColumns,
    ?string $delete = null,
    ?string $update = null,
): static {
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
addPrimaryKey() public method

public static addPrimaryKey ( string $table, string $name, array|string $columns )
$table string
$name string
$columns array|string

                public function addPrimaryKey(string $table, string $name, array|string $columns): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
addUnique() public method

public static addUnique ( string $table, string $name, array|string $columns )
$table string
$name string
$columns array|string

                public function addUnique(string $table, string $name, array|string $columns): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
alterColumn() public method

public static alterColumn ( string $table, string $column, Yiisoft\Db\Schema\Column\ColumnInterface|string $type )
$table string
$column string
$type Yiisoft\Db\Schema\Column\ColumnInterface|string

                public function alterColumn(string $table, string $column, ColumnInterface|string $type): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
bindParam() public method

public static bindParam ( integer|string $name, mixed &$value, ?int $dataType null, ?int $length null, mixed $driverOptions null )
$name integer|string
$value mixed
$dataType ?int
$length ?int
$driverOptions mixed

                public function bindParam(
    int|string $name,
    mixed &$value,
    ?int $dataType = null,
    ?int $length = null,
    mixed $driverOptions = null,
): static {
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
bindValue() public method

public static bindValue ( integer|string $name, mixed $value, ?int $dataType null )
$name integer|string
$value mixed
$dataType ?int

                public function bindValue(int|string $name, mixed $value, ?int $dataType = null): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
bindValues() public method

public static bindValues ( array $values )
$values array

                public function bindValues(array $values): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
cancel() public method

public void cancel ( )

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

            
checkIntegrity() public method

public static checkIntegrity ( string $schema, string $table, boolean $check true )
$schema string
$table string
$check boolean

                public function checkIntegrity(string $schema, string $table, bool $check = true): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
createIndex() public method

public static createIndex ( string $table, string $name, array|string $columns, ?string $indexType null, ?string $indexMethod null )
$table string
$name string
$columns array|string
$indexType ?string
$indexMethod ?string

                public function createIndex(
    string $table,
    string $name,
    array|string $columns,
    ?string $indexType = null,
    ?string $indexMethod = null,
): static {
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
createTable() public method

public static createTable ( string $table, array $columns, ?string $options null )
$table string
$columns array
$options ?string

                public function createTable(string $table, array $columns, ?string $options = null): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
createView() public method

public static createView ( string $viewName, Yiisoft\Db\Query\QueryInterface|string $subQuery )
$viewName string
$subQuery Yiisoft\Db\Query\QueryInterface|string

                public function createView(string $viewName, QueryInterface|string $subQuery): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
delete() public method

public static delete ( string $table, array|string $condition '', array $params = [] )
$table string
$condition array|string
$params array

                public function delete(string $table, array|string $condition = '', array $params = []): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
dropCheck() public method

public static dropCheck ( string $table, string $name )
$table string
$name string

                public function dropCheck(string $table, string $name): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
dropColumn() public method

public static dropColumn ( string $table, string $column )
$table string
$column string

                public function dropColumn(string $table, string $column): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
dropCommentFromColumn() public method

public static dropCommentFromColumn ( string $table, string $column )
$table string
$column string

                public function dropCommentFromColumn(string $table, string $column): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
dropCommentFromTable() public method

public static dropCommentFromTable ( string $table )
$table string

                public function dropCommentFromTable(string $table): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
dropDefaultValue() public method

public static dropDefaultValue ( string $table, string $name )
$table string
$name string

                public function dropDefaultValue(string $table, string $name): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
dropForeignKey() public method

public static dropForeignKey ( string $table, string $name )
$table string
$name string

                public function dropForeignKey(string $table, string $name): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
dropIndex() public method

public static dropIndex ( string $table, string $name )
$table string
$name string

                public function dropIndex(string $table, string $name): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
dropPrimaryKey() public method

public static dropPrimaryKey ( string $table, string $name )
$table string
$name string

                public function dropPrimaryKey(string $table, string $name): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
dropTable() public method

public static dropTable ( string $table, boolean $ifExists false, boolean $cascade false )
$table string
$ifExists boolean
$cascade boolean

                public function dropTable(string $table, bool $ifExists = false, bool $cascade = false): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
dropUnique() public method

public static dropUnique ( string $table, string $name )
$table string
$name string

                public function dropUnique(string $table, string $name): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
dropView() public method

public static dropView ( string $viewName )
$viewName string

                public function dropView(string $viewName): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
execute() public method

public integer execute ( )

                public function execute(): int
{
    [$callStack] = debug_backtrace();
    $id = random_bytes(36);
    $this->collectQueryStart($id, $callStack['file'] . ':' . $callStack['line']);
    try {
        $result = $this->decorated->execute();
    } catch (Throwable $e) {
        $this->collectQueryError($id, $e);
        throw $e;
    }
    $this->collectQueryEnd($id, $result);
    return $result;
}

            
getParams() public method

public array getParams ( boolean $asValues true )
$asValues boolean

                public function getParams(bool $asValues = true): array
{
    return $this->decorated->getParams($asValues);
}

            
getRawSql() public method

public string getRawSql ( )

                public function getRawSql(): string
{
    return $this->decorated->getRawSql();
}

            
getSql() public method

public string getSql ( )

                public function getSql(): string
{
    return $this->decorated->getSql();
}

            
insert() public method

public static insert ( string $table, array|Yiisoft\Db\Query\QueryInterface $columns )
$table string
$columns array|Yiisoft\Db\Query\QueryInterface

                public function insert(string $table, array|QueryInterface $columns): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
insertBatch() public method

public static insertBatch ( string $table, iterable $rows, array $columns = [] )
$table string
$rows iterable
$columns array

                public function insertBatch(string $table, iterable $rows, array $columns = []): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
insertReturningPks() public method

public array insertReturningPks ( string $table, array|Yiisoft\Db\Query\QueryInterface $columns )
$table string
$columns array|Yiisoft\Db\Query\QueryInterface

                public function insertReturningPks(string $table, array|QueryInterface $columns): array
{
    /** @psalm-var array<string, mixed> */
    return $this->decorated->{__FUNCTION__}(...func_get_args());
}

            
prepare() public method

public void prepare ( ?bool $forRead null )
$forRead ?bool

                public function prepare(?bool $forRead = null): void
{
    $this->decorated->{__FUNCTION__}(...func_get_args());
}

            
query() public method

public Yiisoft\Db\Query\DataReaderInterface query ( )

                public function query(): DataReaderInterface
{
    [$callStack] = debug_backtrace();
    $id = random_bytes(36);
    $this->collectQueryStart($id, $callStack['file'] . ':' . $callStack['line']);
    try {
        $result = $this->decorated->query();
    } catch (Throwable $e) {
        $this->collectQueryError($id, $e);
        throw $e;
    }
    $rowsNumber = $result->count();
    $this->collectQueryEnd($id, $rowsNumber);
    return $result;
}

            
queryAll() public method

public array queryAll ( )

                public function queryAll(): array
{
    [$callStack] = debug_backtrace();
    $id = random_bytes(36);
    $this->collectQueryStart($id, $callStack['file'] . ':' . $callStack['line']);
    try {
        $result = $this->decorated->queryAll();
    } catch (Throwable $e) {
        $this->collectQueryError($id, $e);
        throw $e;
    }
    $this->collectQueryEnd($id, count($result));
    return $result;
}

            
queryColumn() public method

public array queryColumn ( )

                public function queryColumn(): array
{
    [$callStack] = debug_backtrace();
    $id = random_bytes(36);
    $this->collectQueryStart($id, $callStack['file'] . ':' . $callStack['line']);
    try {
        $result = $this->decorated->queryColumn();
    } catch (Throwable $e) {
        $this->collectQueryError($id, $e);
        throw $e;
    }
    $this->collectQueryEnd($id, count($result));
    return $result;
}

            
queryOne() public method

public ?array queryOne ( )

                public function queryOne(): ?array
{
    [$callStack] = debug_backtrace();
    $id = random_bytes(36);
    $this->collectQueryStart($id, $callStack['file'] . ':' . $callStack['line']);
    try {
        $result = $this->decorated->queryOne();
    } catch (Throwable $e) {
        $this->collectQueryError($id, $e);
        throw $e;
    }
    $this->collectQueryEnd($id, $result === null ? 0 : 1);
    return $result;
}

            
queryScalar() public method

public bool|string|int|float|null queryScalar ( )

                public function queryScalar(): bool|string|int|float|null
{
    [$callStack] = debug_backtrace();
    $id = random_bytes(36);
    $this->collectQueryStart($id, $callStack['file'] . ':' . $callStack['line']);
    try {
        $result = $this->decorated->queryScalar();
    } catch (Throwable $e) {
        $this->collectQueryError($id, $e);
        throw $e;
    }
    $this->collectQueryEnd($id, $result === null ? 0 : 1);
    return $result;
}

            
renameColumn() public method

public static renameColumn ( string $table, string $oldName, string $newName )
$table string
$oldName string
$newName string

                public function renameColumn(string $table, string $oldName, string $newName): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
renameTable() public method

public static renameTable ( string $table, string $newName )
$table string
$newName string

                public function renameTable(string $table, string $newName): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
resetSequence() public method

public static resetSequence ( string $table, integer|string|null $value null )
$table string
$value integer|string|null

                public function resetSequence(string $table, int|string|null $value = null): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
setRawSql() public method

public static setRawSql ( string $sql )
$sql string

                public function setRawSql(string $sql): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
setRetryHandler() public method

public static setRetryHandler ( ?\Closure $handler )
$handler ?\Closure

                public function setRetryHandler(?Closure $handler): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
setSql() public method

public static setSql ( string $sql )
$sql string

                public function setSql(string $sql): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
showDatabases() public method

public array showDatabases ( )

                public function showDatabases(): array
{
    return $this->decorated->showDatabases();
}

            
truncateTable() public method

public static truncateTable ( string $table )
$table string

                public function truncateTable(string $table): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
update() public method

public static update ( string $table, array $columns, array|Yiisoft\Db\Expression\ExpressionInterface|string $condition '', array|Yiisoft\Db\Expression\ExpressionInterface|string|null $from null, array $params = [] )
$table string
$columns array
$condition array|Yiisoft\Db\Expression\ExpressionInterface|string
$from array|Yiisoft\Db\Expression\ExpressionInterface|string|null
$params array

                public function update(
    string $table,
    array $columns,
    array|ExpressionInterface|string $condition = '',
    array|ExpressionInterface|string|null $from = null,
    array $params = [],
): static {
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
upsert() public method

public static upsert ( string $table, array|Yiisoft\Db\Query\QueryInterface $insertColumns, array|boolean $updateColumns true )
$table string
$insertColumns array|Yiisoft\Db\Query\QueryInterface
$updateColumns array|boolean

                public function upsert(
    string $table,
    array|QueryInterface $insertColumns,
    array|bool $updateColumns = true,
): static {
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
upsertReturning() public method

public array upsertReturning ( string $table, array|Yiisoft\Db\Query\QueryInterface $insertColumns, array|boolean $updateColumns true, ?array $returnColumns null )
$table string
$insertColumns array|Yiisoft\Db\Query\QueryInterface
$updateColumns array|boolean
$returnColumns ?array

                public function upsertReturning(
    string $table,
    array|QueryInterface $insertColumns,
    array|bool $updateColumns = true,
    ?array $returnColumns = null,
): array {
    /** @psalm-var array<string, mixed> */
    return $this->decorated->{__FUNCTION__}(...func_get_args());
}

            
upsertReturningPks() public method

public array upsertReturningPks ( string $table, array|Yiisoft\Db\Query\QueryInterface $insertColumns, array|boolean $updateColumns true )
$table string
$insertColumns array|Yiisoft\Db\Query\QueryInterface
$updateColumns array|boolean

                public function upsertReturningPks(
    string $table,
    array|QueryInterface $insertColumns,
    array|bool $updateColumns = true,
): array {
    /** @var array */
    return $this->decorated->{__FUNCTION__}(...func_get_args());
}

            
withDbTypecasting() public method

public static withDbTypecasting ( boolean $dbTypecasting true )
$dbTypecasting boolean

                public function withDbTypecasting(bool $dbTypecasting = true): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
withPhpTypecasting() public method

public static withPhpTypecasting ( boolean $phpTypecasting true )
$phpTypecasting boolean

                public function withPhpTypecasting(bool $phpTypecasting = true): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

            
withTypecasting() public method

public static withTypecasting ( boolean $typecasting true )
$typecasting boolean

                public function withTypecasting(bool $typecasting = true): static
{
    return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}