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

A column an INSERT or REPLACE names twice among the columns it writes.

Source: https://dev.mysql.com/doc/mysql-errors/8.4/en/server-error-reference.html (ER_FIELD_SPECIFIED_TWICE).

Reading the column written twicedoctest
(new \SqlSemantics\Platform\MySql\Semantics())->analyze('INSERT INTO t (a, a) VALUES (1, 2)') // throws \SqlSemantics\Platform\MySql\Model\Diagnostic\SemanticException: Column 'a' specified twice

Properties§

public Name $column

Methods§

public function __construct(public Name $column)

Parameters

$columnNameThe column named again
public function message(): string

Describes the problem in the words of the server.

Returns

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