final class Subpartitioning
    implements Node
    uses Snapshot
Public API: explicitly declared with @visibility public.

SUBPARTITION BY [LINEAR] HASH|KEY … [SUBPARTITIONS n]: the subpartitioning of each partition.

Mirrors PT_sub_partition_by_hash and PT_sub_partition_by_key: only HASH and KEY can subpartition. Source: https://dev.mysql.com/doc/refman/8.4/en/partitioning-subpartitions.html.

Holding a subpartitioning by keydoctest
$sub = new \SqlSemantics\Platform\MySql\Statement\Partition\Subpartitioning(new \SqlSemantics\Platform\MySql\Statement\Partition\Method\KeyMethod(false, null, [new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('id')]), new \SqlSemantics\Platform\MySql\Statement\Literal\Numeral('2'));
    $sub->count?->text // => '2'

Properties§

public Numeral|null $count

Methods§

public function __construct(public PartitionMethod $method, public Numeral|null $count)

Parameters

$methodPartitionMethodThe HASH or KEY method
$countNumeral|nullThe SUBPARTITIONS count, when written
Calls 1
public function deriveSubpartitioning(Derivation $derivation, Environment $scope): void

Derives the method in the scope of the table.

Parameters

$derivationDerivation
$scopeEnvironment
Calls 1
public function render(Output $out): void

Writes the clause.

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 1
Type declarations 2