classSubpartitioning
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.
$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 PartitionMethod $methodpublic Numeral|null $countMethods§
public function __construct(public PartitionMethod $method, public Numeral|null $count)Parameters
$method | PartitionMethod | The HASH or KEY method |
$count | Numeral|null | The SUBPARTITIONS count, when written |
Calls 1
- static-call Check::input() line 40
public function deriveSubpartitioning(Derivation $derivation, Environment $scope): voidDerives the method in the scope of the table.
Parameters
$derivation | Derivation | |
$scope | Environment |
Calls 1
- method-call PartitionMethod::deriveMethod() line 48
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
SubpartitioningTestcalls
Relations§
Instantiated in 1
Type declarations 2
- type SqlSemantics\Platform\MySql\Lowering\TableChange\Partition\PartitionRule packages/sql-semantics-mysql/src/Lowering/TableChange/Partition/PartitionRule.php:189
- type SqlSemantics\Platform\MySql\Statement\Partition\PartitionClause packages/sql-semantics-mysql/src/Statement/Partition/PartitionClause.php:52