classCoalescePartition
final class CoalescePartition
implements StandaloneCommand
uses Snapshot
Public API: explicitly declared with
@visibility public.COALESCE PARTITION [NO_WRITE_TO_BINLOG] n: a request to merge away n partitions of a HASH or KEY table.
Mirrors PT_alter_table_coalesce_partition. LOCAL and NO_WRITE_TO_BINLOG are synonyms. Source: https://dev.mysql.com/doc/refman/8.4/en/partitioning-management-hash-key.html.
(new \SqlSemantics\Platform\MySql\Semantics())->analyze('ALTER TABLE t COALESCE PARTITION 2')->statement->commands[0]->count->text // => '2'Properties§
public bool $localpublic Numeral $countMethods§
public function __construct(public bool $local, public Numeral $count)Parameters
$local | bool | Whether NO_WRITE_TO_BINLOG or LOCAL is written |
$count | Numeral | The number of partitions to remove |
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 48
- method-call Output::node() line 52
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
CoalescePartitionTestcalls