Final Class Yiisoft\Db\Debug\CommandInterfaceProxy
| Inheritance | Yiisoft\Db\Debug\CommandInterfaceProxy |
|---|---|
| Implements | Yiisoft\Db\Command\CommandInterface |
Public Methods
Method Details
| 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,
) {}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy addForeignKey ( string $table, string $name, array|string $columns, string $referenceTable, array|string $referenceColumns, string|null $delete = null, string|null $update = null ) | ||
| $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 Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy bindParam ( integer|string $name, mixed &$value, integer|null $dataType = null, integer|null $length = null, mixed $driverOptions = null ) | ||
| $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 Yiisoft\Db\Debug\CommandInterfaceProxy bindValue ( integer|string $name, mixed $value, integer|null $dataType = null ) | ||
| $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 Yiisoft\Db\Debug\CommandInterfaceProxy bindValues ( array $values ) | ||
| $values | array | |
public function bindValues(array $values): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public void cancel ( ) |
public function cancel(): void
{
$this->decorated->{__FUNCTION__}(...func_get_args());
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy createIndex ( string $table, string $name, array|string $columns, string|null $indexType = null, string|null $indexMethod = null ) | ||
| $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 Yiisoft\Db\Debug\CommandInterfaceProxy createTable ( string $table, array $columns, string|null $options = null ) | ||
| $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 Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy dropCommentFromTable ( string $table ) | ||
| $table | string | |
public function dropCommentFromTable(string $table): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy dropView ( string $viewName ) | ||
| $viewName | string | |
public function dropView(string $viewName): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| 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;
}
| public array getParams ( boolean $asValues = true ) | ||
| $asValues | boolean | |
public function getParams(bool $asValues = true): array
{
return $this->decorated->getParams($asValues);
}
| public string getRawSql ( ) |
public function getRawSql(): string
{
return $this->decorated->getRawSql();
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| 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());
}
| public void prepare ( boolean|null $forRead = null ) | ||
| $forRead | boolean|null | |
public function prepare(?bool $forRead = null): void
{
$this->decorated->{__FUNCTION__}(...func_get_args());
}
| 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;
}
| 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;
}
| 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;
}
| public array|null 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;
}
| public boolean|string|integer|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;
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy setRawSql ( string $sql ) | ||
| $sql | string | |
public function setRawSql(string $sql): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy setRetryHandler ( Closure|null $handler ) | ||
| $handler | Closure|null | |
public function setRetryHandler(?Closure $handler): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy setSql ( string $sql ) | ||
| $sql | string | |
public function setSql(string $sql): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public array showDatabases ( ) |
public function showDatabases(): array
{
return $this->decorated->showDatabases();
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy truncateTable ( string $table ) | ||
| $table | string | |
public function truncateTable(string $table): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy 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);
}
| public array upsertReturning ( string $table, array|Yiisoft\Db\Query\QueryInterface $insertColumns, array|boolean $updateColumns = true, array|null $returnColumns = null ) | ||
| $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 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());
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy withDbTypecasting ( boolean $dbTypecasting = true ) | ||
| $dbTypecasting | boolean | |
public function withDbTypecasting(bool $dbTypecasting = true): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy withPhpTypecasting ( boolean $phpTypecasting = true ) | ||
| $phpTypecasting | boolean | |
public function withPhpTypecasting(bool $phpTypecasting = true): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
| public Yiisoft\Db\Debug\CommandInterfaceProxy withTypecasting ( boolean $typecasting = true ) | ||
| $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.