classConditionalTable
final class ConditionalTable
implements TableResolution
uses Snapshot
Public API: explicitly declared with
@visibility public.A relation name declared in a later searched schema while an earlier schema is not completely known.
An undeclared relation of the earlier schema would be found first, so the known declaration is a candidate and not the resolution.
$semantics = new \SqlSemantics\Platform\PostgreSql\Semantics();
$declarations = $semantics->context([$semantics->analyze('CREATE TABLE public.t (a INTEGER)')], false);
$query = $semantics->analyze('SELECT a FROM t', $declarations);
count($query->facts->relation($query->inputRelation())->table->candidates) // => 1Properties§
public non-empty-list<Table> $candidatespublic UndeclaredRelation $missingMethods§
public function __construct(list<Table> $candidates, public UndeclaredRelation $missing)Parameters
$candidates | list<Table> | The declarations found in the later schema; at least one |
$missing | UndeclaredRelation | The possibly existing relation of an earlier schema |
Calls 2
- static-call Check::listOf() line 40
- class-const Table::class() line 40
Relations§
Instantiated in 1
Type checks 6
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Access\GrantedRelations::derive() packages/sql-semantics-postgres/src/Rules/Access/GrantedRelations.php:62
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Catalog\PublishedTables::derive() packages/sql-semantics-postgres/src/Rules/Catalog/PublishedTables.php:58
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Resolution\TableShapes::input() packages/sql-semantics-postgres/src/Rules/Resolution/TableShapes.php:81
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Routine\RelationTargets::record() packages/sql-semantics-postgres/src/Rules/Routine/RelationTargets.php:108
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Table\Targets::resolve() packages/sql-semantics-postgres/src/Rules/Table/Targets.php:58
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Typing\TypeLookup::column() packages/sql-semantics-postgres/src/Rules/Typing/TypeLookup.php:97