classOptionRule
final class OptionRule
Lowers the options of partition and subpartition definitions.
Rule: MYSQL-PARTITION-OPTION-001. Scope: opt_part_options, opt_part_option_list, opt_part_option, part_option_list, part_option. The = (opt_equal) and the STORAGE before ENGINE (opt_storage) are optional words of the same option. Constructs: PartitionOption. Terminates: the option list is 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
$lowering | Lowering | The lowering this rule belongs to |
public function options(Node $options): list<PartitionOption>Lowers the options of a definition: a node of opt_part_options; no option is empty.
Parameters
$options | Node |
Returns
list<PartitionOption>Throws
ImplementationGap When a production has no ruleCalled from 2
- method-call SqlSemantics\Platform\MySql\Lowering\TableChange\Partition\DefinitionRule::definition() packages/sql-semantics-mysql/src/Lowering/TableChange/Partition/DefinitionRule.php:129
- method-call SqlSemantics\Platform\MySql\Lowering\TableChange\Partition\DefinitionRule::subpartition() packages/sql-semantics-mysql/src/Lowering/TableChange/Partition/DefinitionRule.php:269
Calls 7
- method-call Lowering::form() line 82
- class-const OptionRule::LISTS() line 83
- static-call ImplementationGap::production() line 83
- class-const OptionRule::SPINES() line 88
- method-call Lists::items() line 92
- new Lists line 92
- method-call OptionRule::option() line 93
public function option(Node $option): PartitionOptionLowers one option: a node of opt_part_option or part_option.
Parameters
$option | Node |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 4
- method-call Lowering::form() line 106
- class-const OptionRule::OPTIONS() line 107
- static-call ImplementationGap::production() line 107
- new PartitionOption line 113
Private surface 4§
Implementation details, listed for orientation only.
private const OPTIONS = ['opt_part_option: TABLESPACE opt_equal ident_or_text' => [\SqlSemantics\Platfo…private const LISTS = ['opt_part_options:' => false, 'opt_part_options: opt_part_option_list' => true…private const SPINES = ['opt_part_option_list: opt_part_option_list opt_part_option' => true, 'opt_par…private Lowering $loweringTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
OptionRuleTestcalls
Relations§
Instantiated in 2
- new SqlSemantics\Platform\MySql\Lowering\TableChange\Partition\DefinitionRule::definition() packages/sql-semantics-mysql/src/Lowering/TableChange/Partition/DefinitionRule.php:129
- new SqlSemantics\Platform\MySql\Lowering\TableChange\Partition\DefinitionRule::subpartition() packages/sql-semantics-mysql/src/Lowering/TableChange/Partition/DefinitionRule.php:269
Method calls 2
- method-call SqlSemantics\Platform\MySql\Lowering\TableChange\Partition\DefinitionRule::definition() packages/sql-semantics-mysql/src/Lowering/TableChange/Partition/DefinitionRule.php:129
- method-call SqlSemantics\Platform\MySql\Lowering\TableChange\Partition\DefinitionRule::subpartition() packages/sql-semantics-mysql/src/Lowering/TableChange/Partition/DefinitionRule.php:269