classTableChangeRules
final class TableChangeRules
The entry rules of the table change family: the methods other families and the statement dispatcher call.
Rule: MYSQL-TABLE-CHANGE-ENTRY-001. Scope: ALTER TABLE, partitioning, DROP TABLE and INDEX, RENAME TABLE and TRUNCATE. The method names, parameters and return types are fixed by the family plan; each delegates to the rule classes of this family (MYSQL-TABLE-CHANGE-STATEMENT-001, MYSQL-ALTER-STATEMENT-001, MYSQL-PARTITION-CLAUSE-001, MYSQL-ALTER-MODIFIER-001, MYSQL-ALTER-STANDALONE-001). Terminates: delegates once. Source: https://dev.mysql.com/doc/refman/8.4/en/alter-table.html. Status: Implemented.
Properties§
public Lowering $loweringMethods§
public function __construct(public Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
Lowers a table change statement: a node of one of the statement rules this family owns.
Parameters
$statement | Node |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 3
- method-call StatementRule::statement() line 49
- new StatementRule line 49
- method-call Lowering::form() line 49
Lowers a production of alter or drop that MYSQL-DEFINITION-ROUTES-001 routes to this family.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 2
- method-call StatementRule::statement() line 59
- new StatementRule line 59
public function partitioning(Node $clause): ?PartitioningLowers the partitioning of CREATE TABLE: a node of opt_create_partitioning or partition_clause;
an absent clause is null.
Parameters
$clause | Node |
Returns
Throws
ImplementationGap When a production has no ruleCalls 2
- method-call PartitionRule::partitioning() line 70
- new PartitionRule line 70
public function alterOptions(Node $options): list<AlterOption>Lowers the ALGORITHM and LOCK options of CREATE INDEX and DROP INDEX: a node of
opt_index_lock_algorithm or opt_index_lock_and_algorithm.
Parameters
$options | Node |
Returns
list<AlterOption>Throws
ImplementationGap When a production has no ruleCalls 2
- method-call ModifierRule::pair() line 82
- new ModifierRule line 82
public function partitionNames(Node $list): PartitionSelectionLowers the partitions a maintenance operation names: a node of all_or_alt_part_name_list.
Parameters
$list | Node |
Returns
Throws
ImplementationGap When a production has no ruleCalls 2
- method-call StandaloneRule::selection() line 92
- new StandaloneRule line 92
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
TableChangeRulesTestcalls