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

Lowers CREATE, ALTER and DROP DATABASE.

Rule: MYSQL-DATABASE-001. Scope: the DATABASE alternatives of create, alter and drop (alter and drop in 5.6 and 5.7), alter_database_stmt, drop_database_stmt, opt_create_database_options, create_database_options, create_database_option, alter_database_options, alter_database_option, default_encryption. The character set and collation go through the leaf character set rules; DEFAULT before an option and its equals sign are optional (LeafNoise). Constructs: CreateDatabase, AlterDatabase, UpgradeDatabaseName, DropDatabase and the DatabaseOption classes. Terminates: the option lists are flattened iteratively. Source: https://dev.mysql.com/doc/refman/8.4/en/create-database.html, https://dev.mysql.com/doc/refman/8.4/en/alter-database.html, https://dev.mysql.com/doc/refman/8.4/en/drop-database.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function encryption(Node $encryption): DatabaseEncryption

Private surface 2§

Implementation details, listed for orientation only.

private const LISTS = ['opt_create_database_options:', 'create_database_options: create_database_opti…
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 1
Method calls 1