interface OutputNaming
Public API: explicitly declared with @visibility public.

An expression that gives a result column its name when the column has no alias.

PostgreSQL names an unaliased result column after the expression: a column reference after its column, a function call after the function, a cast after its type, and so on; every other expression is named ?column?. Source: https://www.postgresql.org/docs/17/sql-select.html#SQL-SELECT-LIST.

Reading the name a typed constant gives its columndoctest
$query = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze("SELECT integer '1'");
    $query->statement->targets[0]->expression->outputName()?->value // => 'int4'

Methods§

public function outputName(): ?Name

Answers the name the expression gives an unaliased result column, or null when it gives none.

Returns

Test cases 1§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1

Relations§

Implemented by 58
Type checks 7