classUnknownKeyColumn
final class UnknownKeyColumn
implements Diagnostic
uses Snapshot
Public API: explicitly declared with
@visibility public.A key part that names no column of the table (ER_KEY_COLUMN_DOES_NOT_EXITS).
Source: https://dev.mysql.com/doc/mysql-errors/8.4/en/server-error-reference.html.
(new \SqlSemantics\Platform\MySql\Semantics())->analyze('CREATE TABLE t (a INT, KEY (b))') // throws \SqlSemantics\Platform\MySql\Model\Diagnostic\SemanticException: Key column b doesn't exist in table.Properties§
public Name $columnMethods§
public function __construct(public Name $column)Parameters
$column | Name | The column name the key part writes |
public function message(): stringDescribes the problem in the words of the server.
Returns
stringTest cases 1
Test cases 3§
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 2
Relations§
Instantiated in 2
- new SqlSemantics\Platform\MySql\Rules\TableDefinition\TableProblems::keyColumns() packages/sql-semantics-mysql/src/Rules/TableDefinition/TableProblems.php:141
- new SqlSemantics\Platform\MySql\Statement\Table\CreateIndex::deriveStatement() packages/sql-semantics-mysql/src/Statement/Table/CreateIndex.php:108