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

Lowers the partition and tablespace operations of ALTER TABLE.

Rule: MYSQL-ALTER-STANDALONE-001. Scope: the partition and tablespace alternatives of alter_commands (5.6), standalone_alter_commands, add_partition_rule, add_part_extra, reorg_partition_rule, reorg_parts_rule, alt_part_name_list, alt_part_name_item, all_or_alt_part_name_list. LOCAL and NO_WRITE_TO_BINLOG are synonyms. The CHECK and REPAIR options are lowered by the server family. Constructs: TablespaceCommand, AddPartition, DropPartition, MaintainPartitions, CoalescePartition, ReorganizePartition, ExchangePartition, SecondaryLoad, AllPartitions, NamedPartitions. Terminates: lists are flattened iteratively. Source: https://dev.mysql.com/doc/refman/8.4/en/alter-table-partition-operations.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function claims(string $signature): bool

Tells whether a production of alter_commands or standalone_alter_commands is a partition or tablespace operation.

Parameters

$signaturestring

Returns

bool
Test cases 1
Called from 1
Calls 5
public function local(Node $option): bool

Lowers NO_WRITE_TO_BINLOG or LOCAL: a node of opt_no_write_to_binlog.

Parameters

$optionNode

Returns

bool

Throws

ImplementationGap When a production has no rule
Called from 10
public function exchange(Form $form, int $partition, int $table): ExchangePartition

Private surface 6§

Implementation details, listed for orientation only.

private const TABLESPACES = ['alter_commands: DISCARD TABLESPACE' => [false, null], 'alter_commands: IMPORT…
private const MAINTENANCE = ['alter_commands: REBUILD_SYM PARTITION_SYM opt_no_write_to_binlog all_or_alt_p…
private const SINGLES = ['alter_commands: add_partition_rule' => ['addRule', 0], 'standalone_alter_comm…
private const PAIRS = ['standalone_alter_commands: ADD PARTITION_SYM opt_no_write_to_binlog ( part_de…
private const SECONDARY = ['standalone_alter_commands: SECONDARY_LOAD_SYM' => true, 'standalone_alter_com…
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 2
Method calls 3