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

ENABLE KEYS or DISABLE KEYS: a request to start or stop updating the nonunique indexes of a MyISAM table.

Mirrors PT_alter_table_enable_keys. Source: https://dev.mysql.com/doc/refman/8.4/en/alter-table.html#alter-table-index.

Stopping index updatesdoctest
(new \SqlSemantics\Platform\MySql\Semantics())->analyze('ALTER TABLE t DISABLE KEYS')->statement->commands[0]->enable // => false

Properties§

public bool $enable

Methods§

public function __construct(public bool $enable)

Parameters

$enableboolWhether ENABLE (true) or DISABLE (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 2