classDropPartition
final class DropPartition
implements StandaloneCommand
uses Snapshot
Public API: explicitly declared with
@visibility public.DROP PARTITION p, …: a request to remove partitions and their rows.
Mirrors PT_alter_table_drop_partition. 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 DROP PARTITION p0, p1');
count($alter->statement->commands[0]->partitions->names) // => 2Properties§
public NamedPartitions $partitionsMethods§
public function __construct(public NamedPartitions $partitions)Parameters
$partitions | NamedPartitions | The partitions |
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 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
DropPartitionTestcalls