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\MySql\Semantics();
$table = $semantics->analyze('CREATE TABLE t (id INT)')->declarations()[0];
$missing = new \SqlSemantics\Platform\MySql\Model\Statement\Reference\Missing\UndeclaredRelation($table->name);
$conditional = new \SqlSemantics\Platform\MySql\Model\Statement\Reference\Table\ConditionalTable([$table], $missing);
$conditional->candidates[0] === $table // => trueProperties§
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 41
- class-const Table::class() line 41
Relations§
Instantiated in 1
Type checks 5
- instanceof SqlSemantics\Platform\MySql\Rules\Account\PrivilegeChecks::target() packages/sql-semantics-mysql/src/Rules/Account/PrivilegeChecks.php:183
- instanceof SqlSemantics\Platform\MySql\Rules\Query\TableShapes::named() packages/sql-semantics-mysql/src/Rules/Query/TableShapes.php:68
- instanceof SqlSemantics\Platform\MySql\Rules\TableChange\Targets::target() packages/sql-semantics-mysql/src/Rules/TableChange/Targets.php:59
- instanceof SqlSemantics\Platform\MySql\Rules\TableDefinition\TableTargets::existing() packages/sql-semantics-mysql/src/Rules/TableDefinition/TableTargets.php:85
- instanceof SqlSemantics\Platform\MySql\Rules\Utility\ShowTargets::derive() packages/sql-semantics-mysql/src/Rules/Utility/ShowTargets.php:55