classColumnLookup
final class ColumnLookup
Resolves a column name through the relation occurrences of an environment and its enclosing positions.
Rule: CORE-COLUMN-LOOKUP-001. Positions are searched from the innermost outwards. At one position every visible occurrence the qualifier admits is searched; an unqualified name skips hidden slots. Exactly one slot resolves when no occurrence at that or a nearer position is incompletely known; several slots at one position are ambiguous. While a nearer occurrence is incompletely known, a farther known slot is only a candidate and the result is conditional on the missing inputs. A name found nowhere is missing only if every searched occurrence is completely known. Terminates: the chain of enclosing positions and each relation list are finite. Status: Implemented.
Methods§
public function find(
Environment $environment,
Name $column,
?QualifiedName $qualifier = null,
): ResolutionResolves a column name written with an optional relation qualifier.
Parameters
$environment | Environment | |
$column | Name | |
$qualifier | ?QualifiedName |
Returns
Called from 2
Calls 7
- new LookupLevel line 40
- method-call LookupLevel::found() line 41
- method-call LookupLevel::open() line 43
- method-call ColumnLookup::conditional() line 45
- function-call
countline 48 - new AmbiguousColumn line 48
- new MissingColumn line 54
public function conditional(
Name $column,
list<ResolvedColumn> $candidates,
list<VisibleRelation> $open,
): ConditionalColumnBuilds the conditional outcome from known candidates and incompletely known occurrences.
Parameters
$column | Name | |
$candidates | list<ResolvedColumn> | |
$open | list<VisibleRelation> |
Returns
Called from 2
- method-call SqlSemantics\Platform\PostgreSql\Model\Resolution\ColumnLookup::find() packages/sql-semantics-postgres/src/Model/Resolution/ColumnLookup.php:45
- method-call SqlSemantics\Platform\PostgreSql\Model\Resolution\ColumnLookup::find() packages/sql-semantics-postgres/src/Model/Resolution/ColumnLookup.php:54
Calls 3
- function-call
array_pushline 69 - static-call LookupLevel::undecided() line 69
- new ConditionalColumn line 72