classColumnStar
final class ColumnStar
implements Scalar, OutputNaming
uses Snapshot
@visibility public.A dotted relation name followed by .*: every column of a visible relation.
Mirrors PostgreSQL's ColumnRef node whose last field is A_Star. In a select list the query expands it to the relation's columns; as a value elsewhere it is the whole row of the relation.
Rule: PG-COLUMN-STAR-001. One to three qualifier parts name the relation as written, with its schema and catalog. Facts: the row type of the relation, whose fields are its columns; a relation that is not visible is reported. An unaliased result column is named after the relation. Source: https://www.postgresql.org/docs/17/rowtypes.html#ROWTYPES-USAGE, https://www.postgresql.org/docs/17/sql-select.html#SQL-SELECT-LIST. Status: Implemented.
$query = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('SELECT ROW(t.*) FROM t');
$query->toString() // => 'SELECT ROW (t.*) FROM t'Properties§
public non-empty-list<Name> $qualifiersMethods§
public function __construct(list<Name> $qualifiers)Parameters
$qualifiers | list<Name> | The relation name as written; at least one part |
Calls 2
- static-call Check::listOf() line 52
- class-const Name::class() line 52
public function outputName(): NameNames an unaliased result column after the relation.
Returns
Test cases 1
Calls 1
- function-call
countline 60
public function deriveScalar(Derivation $derivation, Environment $environment): ScalarFactResolves the relation and derives its whole row.
Parameters
$derivation | Derivation | |
$environment | Environment |
Returns
Calls 2
- method-call WholeRows::star() line 68
- new WholeRows line 68
public function render(Output $out): voidWrites the relation name, the dot and the star.
Parameters
$out | Output |
Test cases 1
Calls 3
- method-call Spelling::dotted() line 76
- new Spelling line 76
- method-call Output::symbol() line 77
Test cases 8§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 5
Other tests reaching this symbol 3
Relations§
Instantiated in 1
Type checks 6
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Table\Command\TriggerReferences::reference() packages/sql-semantics-postgres/src/Rules/Table/Command/TriggerReferences.php:137
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Table\Command\TriggerReferences::reference() packages/sql-semantics-postgres/src/Rules/Table/Command/TriggerReferences.php:156
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Table\Command\TriggerReferences::reference() packages/sql-semantics-postgres/src/Rules/Table/Command/TriggerReferences.php:157
- instanceof SqlSemantics\Platform\PostgreSql\Statement\Expression\Indirection::__construct() packages/sql-semantics-postgres/src/Statement/Expression/Indirection.php:64
- instanceof SqlSemantics\Platform\PostgreSql\Statement\Expression\Indirection::deriveScalar() packages/sql-semantics-postgres/src/Statement/Expression/Indirection.php:88
- instanceof SqlSemantics\Platform\PostgreSql\Statement\Query\ExpressionTarget::project() packages/sql-semantics-postgres/src/Statement/Query/ExpressionTarget.php:69