classConflictingTables
final class ConflictingTables
implements TableResolution, Diagnostic
uses Snapshot
Public API: explicitly declared with
@visibility public.A relation name that several distinct declarations of the context claim; none is chosen.
$semantics = new \SqlSemantics\Platform\MySql\Semantics();
$declarations = $semantics->context([$semantics->analyze('CREATE TABLE t (a INTEGER)'), $semantics->analyze('CREATE TABLE t (b TEXT)')]);
$semantics->analyze('SELECT 1 FROM t', $declarations) // throws \SqlSemantics\Platform\MySql\Model\Diagnostic\SemanticException: Relation t has conflicting declarations.Properties§
public list<Table> $candidatespublic QualifiedName $nameMethods§
public function __construct(public QualifiedName $name, list<Table> $candidates)Parameters
$name | QualifiedName | The name as the statement wrote it |
$candidates | list<Table> | The declarations that claim the name; at least two |
Calls 2
- static-call Check::listOf() line 37
- class-const Table::class() line 37
public function message(): stringDescribes the problem.
Returns
stringTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Other tests reaching this symbol 1
Relations§
Instantiated in 1
Type checks 2
- instanceof SqlSemantics\Platform\MySql\Rules\TableChange\Renamings::exists() packages/sql-semantics-mysql/src/Rules/TableChange/Renamings.php:104
- instanceof SqlSemantics\Platform\MySql\Statement\Alter\Command\RenameTo::deriveCommand() packages/sql-semantics-mysql/src/Statement/Alter/Command/RenameTo.php:53