Final Class Yiisoft\Db\Query\WithQuery
| Inheritance | Yiisoft\Db\Query\WithQuery |
|---|
Represents a common table expression (CTE) for SQL WITH queries.
A data structure holds the information for a single "WITH" query clause.
See also:
Public Properties
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Db\Query\WithQuery |
Property Details
Method Details
| public mixed __construct ( Yiisoft\Db\Query\QueryInterface|string $query, Yiisoft\Db\Expression\ExpressionInterface|string $alias, boolean $recursive = false ) | ||
| $query | Yiisoft\Db\Query\QueryInterface|string |
The query to be used as a CTE. It can be a Query object or a raw SQL string. |
| $alias | Yiisoft\Db\Expression\ExpressionInterface|string |
The name/alias for the CTE that can be referenced in the main query. |
| $recursive | boolean |
Whether this is a recursive CTE. Default is |
public function __construct(
public readonly QueryInterface|string $query,
public readonly ExpressionInterface|string $alias,
public readonly bool $recursive = false,
) {}
Signup or Login in order to comment.