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

A name several visible slots have at the same precedence; none is chosen.

Keeping every candidate of an ambiguous columndoctest
$semantics = new \SqlSemantics\Platform\PostgreSql\Semantics();
    $declarations = $semantics->context([$semantics->analyze('CREATE TABLE t (a INTEGER)'), $semantics->analyze('CREATE TABLE u (a INTEGER)')]);
    $semantics->analyze('SELECT a FROM t, u', $declarations) // throws \SqlSemantics\Platform\PostgreSql\Model\Diagnostic\SemanticException: Column a is ambiguous.

Properties§

public list<ResolvedColumn> $candidates
public Name $name

Methods§

public function __construct(public Name $name, list<ResolvedColumn> $candidates)

Parameters

$nameNameThe column name
$candidateslist<ResolvedColumn>The equally ranked candidates; at least two
Calls 2
public function message(): string

Describes the problem.

Returns

string

Relations§

Instantiated in 1
Type checks 1