final class UnknownColumn
    implements Diagnostic
    uses Snapshot
Public API: explicitly declared with @visibility public.

A column name in a definition or alteration that the completely known table does not have.

It is reported for the child columns of a foreign key and for the column that ALTER TABLE drops or renames. A name inside an expression is reported by the expression itself as a missing column. Source: https://sqlite.org/lang_altertable.html, https://sqlite.org/foreignkeys.html.

Reporting a dropped column that does not existdoctest
$semantics = new \SqlSemantics\Platform\Sqlite\Semantics();
    $table = $semantics->analyze('CREATE TABLE t (a, b)');
    $semantics->analyze('ALTER TABLE t DROP COLUMN c', [$table]) // throws \SqlSemantics\Platform\Sqlite\Model\Diagnostic\SemanticException: Column c does not exist in the table.

Properties§

public Name $column

Methods§

public function __construct(public Name $column)

Parameters

$columnNameThe name that denotes no column
public function message(): string

Describes the problem.

Returns

string
Test 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

Relations§

Instantiated in 3