final class ColumnName
    implements Node
    uses Snapshot
Public API: explicitly declared with @visibility public.

The name of a column at a position that defines or alters it, with the table qualifier MySQL 5.x allows there.

CREATE TABLE t (t.a INT) and ALTER TABLE t DROP COLUMN shop.t.a write a qualified column name; the server requires the qualifier to name the table of the statement, so it is kept as written. Source: https://dev.mysql.com/doc/refman/5.7/en/identifier-qualifiers.html.

Holding a qualified column namedoctest
$name = new \SqlSemantics\Platform\MySql\Statement\Name\ColumnName(new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('a'), new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\QualifiedName(new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('t')));
    [$name->table?->name->value, $name->column->value] // => ['t', 'a']

Properties§

public Name $column
public QualifiedName|null $table = null

Methods§

public function __construct(public Name $column, public QualifiedName|null $table = null)

Parameters

$columnNameThe column name
$tableQualifiedName|nullThe table qualifier, and its database when written
Calls 1

Test cases 4§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 4

Relations§

Instantiated in 5
Type declarations 14