classPartitionBy
final class PartitionBy
implements TrailingCommand
uses Snapshot
Public API: explicitly declared with
@visibility public.PARTITION BY … in ALTER TABLE: a request to partition or repartition the table.
Mirrors PT_alter_table_partition_by. The partitioning is derived in the scope of the changed table (MYSQL-PARTITIONING-001). Source: https://dev.mysql.com/doc/refman/8.4/en/alter-table-partition-operations.html.
$alter = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('ALTER TABLE t PARTITION BY HASH (a) PARTITIONS 4');
$alter->toString() // => 'ALTER TABLE t PARTITION BY HASH (a) PARTITIONS 4'Properties§
public PartitionClause $partitioningMethods§
public function __construct(public PartitionClause $partitioning)Parameters
$partitioning | PartitionClause | The new partitioning |
public function deriveCommand(Derivation $derivation, Environment $scope): voidDerives the partitioning in the scope of the table.
Parameters
$derivation | Derivation | |
$scope | Environment |
Calls 1
- method-call PartitionClause::derivePartitioning() line 41
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
PartitionByTestcalls