final class LookupLevel
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.

The search of one query position for a column name.

Rule: CORE-COLUMN-LOOKUP-001 (per-position part). A qualifier admits an occurrence by its alias, or, without an alias, by its relation name and the schema the qualifier writes. Within an admitted occurrence the declared slots are searched before the implicit ones. An occurrence whose shape is open, or which has a slot whose name depends on missing inputs, can still own a name it does not visibly have.

Methods§

public function __construct(
    Environment $scope,
    Name $column,
    QualifiedName|null $qualifier,
    int $depth,
)

Parameters

$scopeEnvironmentThe position searched
$columnNameThe column name
$qualifierQualifiedName|nullThe relation qualifier the use wrote
$depthintHow many enclosing queries lie between the use and this position
Calls 5
public static function undecided(VisibleRelation $relation): list<MissingInput>

Answers the inputs that leave the names of an occurrence undecided: those of an open shape and of each unnamed slot.

Parameters

Returns

Called from 2
Calls 1
public function admits(
    Environment $scope,
    VisibleRelation $relation,
    ?QualifiedName $qualifier,
): bool

Tells whether a qualifier admits an occurrence; no qualifier admits every occurrence.

Parameters

$scopeEnvironment
$relationVisibleRelation
$qualifier?QualifiedName

Returns

bool
Called from 1
public function found(): list<ResolvedColumn>

Private surface 2§

Implementation details, listed for orientation only.

private list<ResolvedColumn> $found = []
private list<VisibleRelation> $open = []

Relations§

Instantiated in 1
Static calls 1
Method calls 3