final class PartitionRule
Restricted visibility: declared "@visibility SqlSemantics\Platform\MySql\Lowering\TableChange". Code outside that scope must not name this declaration.

Lowers the partitioning clause: its method, counts and subpartitioning.

Rule: MYSQL-PARTITION-CLAUSE-001. Scope: opt_create_partitioning, opt_partitioning, partitioning, partition_entry, partition, partition_clause, part_type_def, opt_linear, opt_key_algo, part_field_list, part_field_item_list, part_field_item, part_column_list, part_func, sub_part_func, part_func_expr, opt_num_parts, opt_sub_part, sub_part_field_list, sub_part_field_item, opt_num_subparts, opt_name_list, name_list. KEY, HASH, RANGE and LIST over an expression or over columns become the method classes of PT_part_type_def; the parenthesized function of 5.6 and 5.7 is the bit expression it encloses. Constructs: PartitionClause, Subpartitioning, KeyMethod, HashMethod, ExpressionMethod, ColumnsMethod, PartitionEntry. Terminates: lists are flattened iteratively. Source: https://dev.mysql.com/doc/refman/8.4/en/create-table.html#create-table-partitioning. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function marked(Form $form): PartitionClause

Lowers the 5.6 partitioning production that holds the partitioning marker.

Parameters

$formForm

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 2
public function entry(Node $entry): PartitionEntry

Lowers the statement that is only a partitioning clause: a node of partition_entry.

Parameters

$entryNode

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 4
public function subpartitioning(Node $clause): ?Subpartitioning

Lowers the subpartitioning: a node of opt_sub_part; an absent clause is null.

Parameters

$clauseNode

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 5
public function linear(Node $linear): bool
public function algorithm(Node $algorithm): ?Numeral

Lowers the ALGORITHM of a key method: a node of opt_key_algo; an absent option is null.

Parameters

$algorithmNode

Returns

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 2
public function remembered(Form $form): Scalar

Lowers the 5.6 partitioning function that the source position markers enclose.

Parameters

$formForm

Returns

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 2
public function column(Node $item): Name

Lowers one name of a partitioning column list: a node of ident, part_field_item or sub_part_field_item.

Parameters

$itemNode

Returns

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 4

Private surface 5§

Implementation details, listed for orientation only.

private const METHODS = ['part_type_def: opt_linear KEY_SYM opt_key_algo ( part_field_list )' => ['key'…
private const CLAUSES = ['partition: BY part_type_def opt_num_parts opt_sub_part part_defs' => [1, 2, 3…
private const COLUMN_LISTS = ['part_field_list:' => false, 'part_field_list: part_field_item_list' => true, …
private const COLUMN_ITEMS = ['part_field_item_list: part_field_item' => 'part_field_item: ident', 'part_fie…
private Lowering $lowering

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 3
Method calls 3