classColumnVisibility
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.
$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 $columnpublic bool $visibleMethods§
public function __construct(public ColumnName $column, public bool $visible)Parameters
$column | ColumnName | The column |
$visible | bool | Whether VISIBLE (true) or INVISIBLE (false) is written |
public function deriveCommand(Derivation $derivation, Environment $scope): voidDerives nothing: the action holds no expression.
Parameters
$derivation | Derivation | |
$scope | Environment |
public function render(Output $out): voidTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
ColumnVisibilityTestcalls