final class AliasTarget
    implements Resolution
    uses Snapshot
Public API: explicitly declared with @visibility public.

A name that resolves to an output field of the same query by its alias.

The reference stays a reference: the aliased expression is not copied to the use position.

Resolving an ORDER BY name to an output aliasdoctest
$query = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('SELECT 1 AS x ORDER BY x');
    $query->facts->scalar($query->statement->options->order[0]->expression)->resolution->field === $query->field('x') // => true

Properties§

public Field $field

Methods§

public function __construct(public Field $field)

Parameters

$fieldFieldThe output field the alias names

Test cases 4§

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

Other tests reaching this symbol 4

Relations§

Instantiated in 2