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\Sqlite\Semantics())->analyze('SELECT 1 AS x ORDER BY x');
    $query->facts->scalar($query->statement->orderBy[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 16§

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

Dedicated tests 2
Other tests reaching this symbol 14

Relations§

Instantiated in 2
Type checks 4