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.

Dropping two partitionsdoctest
$alter = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('ALTER TABLE t DROP PARTITION p0, p1');
    count($alter->statement->commands[0]->partitions->names) // => 2

Properties§

public NamedPartitions $partitions

Methods§

public function __construct(public NamedPartitions $partitions)

Parameters

$partitionsNamedPartitionsThe partitions
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 2§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1
Other tests reaching this symbol 1

Relations§

Instantiated in 1