classDuplicateColumn
final class DuplicateColumn
implements Diagnostic
uses Snapshot
Public API: explicitly declared with
@visibility public.A column name a table would have twice.
SQLite compares column names without regard to ASCII case and rejects the definition, the added column or the new column name with "duplicate column name". Source: https://sqlite.org/lang_createtable.html, https://sqlite.org/lang_altertable.html.
(new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('CREATE TABLE t (a, A)') // throws \SqlSemantics\Platform\Sqlite\Model\Diagnostic\SemanticException: Column A is defined more than once.Properties§
public Name $columnMethods§
public function __construct(public Name $column)Parameters
$column | Name | The repeated name as written at its later occurrence |
public function message(): stringDescribes the problem.
Returns
stringTest cases 1
Test cases 6§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 5
AlterationProblemsTest::testAddedReportsEveryObstacleOfTheNewColumncallsAlterationProblemsTest::testRenamedReportsAnUnknownOldNameAndATakenNewNamecallsTableProblemsTest::testDuplicatesReportsEachLaterColumnWithATakenNamecallsAlterAddColumnTest::testDeriveStatementReportsWhatRulesTheAdditionOutcallsAlterRenameColumnTest::testDeriveStatementReportsAnUnknownOldNameAndATakenNewNamecalls
Relations§
Instantiated in 3
- new SqlSemantics\Platform\Sqlite\Rules\Definition\AlterationProblems::added() packages/sql-semantics-sqlite/src/Rules/Definition/AlterationProblems.php:95
- new SqlSemantics\Platform\Sqlite\Rules\Definition\AlterationProblems::renamed() packages/sql-semantics-sqlite/src/Rules/Definition/AlterationProblems.php:149
- new SqlSemantics\Platform\Sqlite\Rules\Definition\TableProblems::duplicates() packages/sql-semantics-sqlite/src/Rules/Definition/TableProblems.php:112