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

Lowers partition and subpartition definitions with their values.

Rule: MYSQL-PARTITION-DEFINITION-001. Scope: part_defs, opt_part_defs, part_def_list, part_definition, part_name, opt_part_values, part_func_max, part_values_in, part_value_list, part_value_item, part_value_item_list, part_value_expr_item, part_value_item_list_paren, opt_sub_partition, sub_part_list, sub_part_definition, sub_name. A parenthesized row of values is PT_part_value_item_list_paren; VALUES IN with one row is PT_part_values_in_item and with a parenthesized list of rows PT_part_values_in_list; MAXVALUE without parentheses after LESS THAN is the bound without a row. Constructs: PartitionDefinition, SubpartitionDefinition, LessThan, ValuesIn, ValuesInRows, PartitionRow, PartitionMaximum. 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 definitions(Node $list): list<PartitionDefinition>

Lowers the definitions of a partitioning or of a partition change; an absent list is empty.

Parameters

$listNode

Returns

Throws

ImplementationGap When a production has no rule
Called from 6
Calls 6
public function bound(Node $values): ?PartitionBound

Lowers the values of a partition: a node of opt_part_values; no values is null.

Parameters

$valuesNode

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 4
public function lessThan(Node $bound): LessThan

Lowers the bound of a RANGE partition: a node of part_func_max.

Parameters

$boundNode

Returns

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 4
public function item(Node $item): Scalar|PartitionMaximum

Lowers one value of a row: a node of part_value_expr_item (5.6, 5.7) or part_value_item.

Parameters

$itemNode

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 3
public function subpartitions(Node $list): list<SubpartitionDefinition>

Lowers the subpartitions of a partition: a node of opt_sub_partition; none is empty.

Parameters

$listNode

Throws

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

Private surface 4§

Implementation details, listed for orientation only.

private const SPINES = ['part_def_list: part_definition' => true, 'part_def_list: part_def_list , part…
private const ROW_SPINES = ['part_value_list: part_value_item' => true, 'part_value_list: part_value_list …
private const ROWS = ['part_value_item: ( part_value_item_list )' => true, 'part_value_item_list_par…
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 4
Method calls 5