final class ColumnsMethod
    implements PartitionMethod
    uses Snapshot
Public API: explicitly declared with @visibility public.

RANGE COLUMNS (columns) or LIST COLUMNS (columns): partitioning by a tuple of column values.

Mirrors PT_part_type_def_range_columns and PT_part_type_def_list_columns. The grammar of 5.6 and 5.7 also accepts an empty list, which the server rejects; it is kept. A column name the completely known table does not have is a diagnostic. Source: https://dev.mysql.com/doc/refman/8.4/en/partitioning-columns.html.

Holding a list partitioning by columnsdoctest
$method = new \SqlSemantics\Platform\MySql\Statement\Partition\Method\ColumnsMethod(\SqlSemantics\Platform\MySql\Statement\Partition\Method\PartitionKind::List, [new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('region')]);
    [$method->kind->value, $method->columns[0]->value] // => ['LIST', 'region']

Properties§

public list<Name> $columns

Methods§

public function __construct(public PartitionKind $kind, list<Name> $columns)

Parameters

$kindPartitionKindRANGE or LIST
$columnslist<Name>The partitioning columns in order
Calls 2
public function deriveMethod(Derivation $derivation, Environment $scope): void

Reports the column names the completely known table does not have.

Parameters

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

Writes the method.

Parameters

$outOutput
Calls 3

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 2