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

FIRST or AFTER column: where an added or changed column goes in the column order of the table.

Without a position an added column goes last and a changed column stays where it is. Source: https://dev.mysql.com/doc/refman/8.4/en/alter-table.html#alter-table-redefine-column.

Placing a column after anotherdoctest
(new \SqlSemantics\Platform\MySql\Statement\Alter\Column\ColumnPosition(new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('id')))->after?->value // => 'id'

Properties§

public Name|null $after

Methods§

public function __construct(public Name|null $after)

Parameters

$afterName|nullThe column the column follows, or null for FIRST
public function render(Output $out): void

Writes the position.

Parameters

$outOutput
Calls 2

Test cases 1§

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

Dedicated tests 1

Relations§

Instantiated in 2
Type declarations 4