final class ColumnVisibility
    implements AlterCommand
    uses Snapshot
Public API: explicitly declared with @visibility public.

ALTER [COLUMN] c SET VISIBLE | INVISIBLE (8.0.23 and later): a request to show a column to or hide it from SELECT *.

Mirrors PT_alter_table_column_visibility. The word COLUMN is optional and always written. Source: https://dev.mysql.com/doc/refman/8.4/en/invisible-columns.html.

Hiding a columndoctest
$alter = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('ALTER TABLE t ALTER a SET INVISIBLE');
    [$alter->statement->commands[0]->visible, $alter->toString()] // => [false, 'ALTER TABLE t ALTER COLUMN a SET INVISIBLE']

Properties§

public ColumnName $column
public bool $visible

Methods§

public function __construct(public ColumnName $column, public bool $visible)

Parameters

$columnColumnNameThe column
$visibleboolWhether VISIBLE (true) or INVISIBLE (false) is written
public function deriveCommand(Derivation $derivation, Environment $scope): void

Derives nothing: the action holds no expression.

Parameters

$derivationDerivation
$scopeEnvironment
public function render(Output $out): void

Writes the action.

Parameters

$outOutput
Calls 1

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 1
Type checks 1
Type declarations 1