classIndexVisibility
final class IndexVisibility
implements AlterCommand
uses Snapshot
Public API: explicitly declared with
@visibility public.ALTER INDEX i VISIBLE | INVISIBLE (8.0 and later): a request to make an index visible to or hidden from the optimizer.
Mirrors PT_alter_table_index_visible. Source: https://dev.mysql.com/doc/refman/8.4/en/invisible-indexes.html.
$alter = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('ALTER TABLE t ALTER INDEX i INVISIBLE');
$alter->statement->commands[0]->visible // => falseProperties§
public Name $indexpublic bool $visibleMethods§
public function __construct(public Name $index, public bool $visible)Parameters
$index | Name | The index name |
$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): voidWrites the action.
Parameters
$out | Output |
Calls 2
- method-call Output::keyword() line 50
- class-const NameUse::Label() line 50
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
IndexVisibilityTestcalls