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

Lowers the statements of the table change family other than the actions of ALTER TABLE.

Rule: MYSQL-TABLE-CHANGE-STATEMENT-001. Scope: the DROP TABLE and DROP INDEX alternatives of drop (5.6, 5.7), drop_table_stmt, drop_index_stmt, rename, table_to_table_list, table_to_table, truncate, truncate_stmt, opt_table_sym, partition_entry, and ALTER TABLE through MYSQL-ALTER-STATEMENT-001. TABLE and TABLES are synonyms; the TABLE of TRUNCATE is optional. RENAME USER belongs to the account family, which lowers its list. Constructs: DropTable, DropIndex, RenameTable, TableRenaming, TruncateTable, TargetTable, PartitionEntry. Terminates: lists are flattened iteratively. Source: https://dev.mysql.com/doc/refman/8.4/en/drop-table.html, https://dev.mysql.com/doc/refman/8.4/en/drop-index.html, https://dev.mysql.com/doc/refman/8.4/en/rename-table.html, https://dev.mysql.com/doc/refman/8.4/en/truncate-table.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function dropTable(Form $form): DropTable
public function renameUsers(Form $form): Statement

Hands RENAME USER to the account family.

Parameters

$formForm

Returns

Throws

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

Private surface 3§

Implementation details, listed for orientation only.

private const STATEMENTS = ['drop: DROP opt_temporary table_or_tables if_exists table_list opt_restrict' =…
private const TABLE_WORDS = ['opt_table_sym:' => true, 'opt_table_sym: TABLE_SYM' => true, 'opt_table:' => …
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 2