Final Class Yiisoft\Db\Debug\CommandInterfaceProxy
| Inheritance | Yiisoft\Db\Debug\CommandInterfaceProxy |
|---|---|
| Implements | Yiisoft\Db\Command\CommandInterface |
Public Methods
Method Details
| public __construct( Yiisoft\Db\Command\CommandInterface $decorated, Yiisoft\Db\Debug\DatabaseCollector $collector ): mixed | ||
| $decorated | Yiisoft\Db\Command\CommandInterface | |
| $collector | Yiisoft\Db\Debug\DatabaseCollector | |
public function __construct(
private CommandInterface $decorated,
private DatabaseCollector $collector,
) {}
| public addCheck( string $table, string $name, string $expression ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $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);
}
| public addColumn( string $table, string $column, Yiisoft\Db\Schema\Column\ColumnInterface|string $type ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $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);
}
| public addCommentOnColumn( string $table, string $column, string $comment ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $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);
}
| public addCommentOnTable( string $table, string $comment ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $table | string | |
| $comment | string | |
public function addCommentOnTable(string $table, string $comment): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public addDefaultValue( string $table, string $name, string $column, mixed $value ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $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);
}
| public addForeignKey( string $table, string $name, array|string $columns, string $referenceTable, array|string $referenceColumns, string|null $delete = null, string|null $update = null ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $table | string | |
| $name | string | |
| $columns | array|string | |
| $referenceTable | string | |
| $referenceColumns | array|string | |
| $delete | string|null | |
| $update | string|null | |
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);
}
| public addPrimaryKey( string $table, string $name, array|string $columns ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $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);
}
| public addUnique( string $table, string $name, array|string $columns ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $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);
}
| public alterColumn( string $table, string $column, Yiisoft\Db\Schema\Column\ColumnInterface|string $type ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $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);
}
| public bindParam( integer|string $name, mixed &$value, integer|null $dataType = null, integer|null $length = null, mixed $driverOptions = null ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $name | integer|string | |
| $value | mixed | |
| $dataType | integer|null | |
| $length | integer|null | |
| $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);
}
| public bindValue( integer|string $name, mixed $value, integer|null $dataType = null ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $name | integer|string | |
| $value | mixed | |
| $dataType | integer|null | |
public function bindValue(int|string $name, mixed $value, ?int $dataType = null): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public bindValues( array $values ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $values | array | |
public function bindValues(array $values): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public cancel( ): void |
public function cancel(): void
{
$this->decorated->{__FUNCTION__}(...func_get_args());
}
| public checkIntegrity( string $schema, string $table, boolean $check = true ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $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);
}
| public createIndex( string $table, string $name, array|string $columns, string|null $indexType = null, string|null $indexMethod = null ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $table | string | |
| $name | string | |
| $columns | array|string | |
| $indexType | string|null | |
| $indexMethod | string|null | |
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);
}
| public createTable( string $table, array $columns, string|null $options = null ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $table | string | |
| $columns | array | |
| $options | string|null | |
public function createTable(string $table, array $columns, ?string $options = null): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public createView( string $viewName, Yiisoft\Db\Query\QueryInterface|string $subQuery ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $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);
}
| public delete( string $table, array|string $condition = '', array $params = [] ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $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);
}
| public dropCheck( string $table, string $name ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $table | string | |
| $name | string | |
public function dropCheck(string $table, string $name): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public dropColumn( string $table, string $column ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $table | string | |
| $column | string | |
public function dropColumn(string $table, string $column): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public dropCommentFromColumn( string $table, string $column ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $table | string | |
| $column | string | |
public function dropCommentFromColumn(string $table, string $column): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public dropCommentFromTable( string $table ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $table | string | |
public function dropCommentFromTable(string $table): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public dropDefaultValue( string $table, string $name ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $table | string | |
| $name | string | |
public function dropDefaultValue(string $table, string $name): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public dropForeignKey( string $table, string $name ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $table | string | |
| $name | string | |
public function dropForeignKey(string $table, string $name): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public dropIndex( string $table, string $name ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $table | string | |
| $name | string | |
public function dropIndex(string $table, string $name): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public dropPrimaryKey( string $table, string $name ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $table | string | |
| $name | string | |
public function dropPrimaryKey(string $table, string $name): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public dropTable( string $table, boolean $ifExists = false, boolean $cascade = false ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $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);
}
| public dropUnique( string $table, string $name ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $table | string | |
| $name | string | |
public function dropUnique(string $table, string $name): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public dropView( string $viewName ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $viewName | string | |
public function dropView(string $viewName): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public execute( ): integer |
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;
}
| public getParams( boolean $asValues = true ): array | ||
| $asValues | boolean | |
public function getParams(bool $asValues = true): array
{
return $this->decorated->getParams($asValues);
}
| public getRawSql( ): string |
public function getRawSql(): string
{
return $this->decorated->getRawSql();
}
| public insert( string $table, array|Yiisoft\Db\Query\QueryInterface $columns ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $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);
}
| public insertBatch( string $table, iterable $rows, array $columns = [] ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $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);
}
| public insertReturningPks( string $table, array|Yiisoft\Db\Query\QueryInterface $columns ): array | ||
| $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());
}
| public prepare( boolean|null $forRead = null ): void | ||
| $forRead | boolean|null | |
public function prepare(?bool $forRead = null): void
{
$this->decorated->{__FUNCTION__}(...func_get_args());
}
| public query( ): Yiisoft\Db\Query\DataReaderInterface |
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;
}
| public queryAll( ): array |
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;
}
| public queryColumn( ): array |
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;
}
| public queryOne( ): array|null |
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;
}
| public queryScalar( ): boolean|string|integer|float|null |
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;
}
| public renameColumn( string $table, string $oldName, string $newName ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $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);
}
| public renameTable( string $table, string $newName ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $table | string | |
| $newName | string | |
public function renameTable(string $table, string $newName): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public resetSequence( string $table, integer|string|null $value = null ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $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);
}
| public setRawSql( string $sql ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $sql | string | |
public function setRawSql(string $sql): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public setRetryHandler( Closure|null $handler ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $handler | Closure|null | |
public function setRetryHandler(?Closure $handler): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public setSql( string $sql ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $sql | string | |
public function setSql(string $sql): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public showDatabases( ): array |
public function showDatabases(): array
{
return $this->decorated->showDatabases();
}
| public truncateTable( string $table ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $table | string | |
public function truncateTable(string $table): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public update( string $table, array $columns, array|Yiisoft\Db\Expression\ExpressionInterface|string $condition = '', array|Yiisoft\Db\Expression\ExpressionInterface|string|null $from = null, array $params = [] ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $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);
}
| public upsert( string $table, array|Yiisoft\Db\Query\QueryInterface $insertColumns, array|boolean $updateColumns = true ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $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);
}
| public upsertReturning( string $table, array|Yiisoft\Db\Query\QueryInterface $insertColumns, array|boolean $updateColumns = true, array|null $returnColumns = null ): array | ||
| $table | string | |
| $insertColumns | array|Yiisoft\Db\Query\QueryInterface | |
| $updateColumns | array|boolean | |
| $returnColumns | array|null | |
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());
}
| public upsertReturningPks( string $table, array|Yiisoft\Db\Query\QueryInterface $insertColumns, array|boolean $updateColumns = true ): array | ||
| $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());
}
| public withDbTypecasting( boolean $dbTypecasting = true ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $dbTypecasting | boolean | |
public function withDbTypecasting(bool $dbTypecasting = true): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public withPhpTypecasting( boolean $phpTypecasting = true ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $phpTypecasting | boolean | |
public function withPhpTypecasting(bool $phpTypecasting = true): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public withTypecasting( boolean $typecasting = true ): Yiisoft\Db\Debug\CommandInterfaceProxy | ||
| $typecasting | boolean | |
public function withTypecasting(bool $typecasting = true): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
Signup or Login in order to comment.