classDatabaseCollation
final class DatabaseCollation
implements DatabaseOption
uses Snapshot
Public API: explicitly declared with
@visibility public.[DEFAULT] COLLATE [=] collation: the default collation of the database's tables.
DEFAULT before the option and the equals sign are optional and not written. The name DEFAULT, accepted by MySQL 5.x, takes the collation of the character set. Source: https://dev.mysql.com/doc/refman/8.4/en/create-database.html.
$alter = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('ALTER DATABASE d COLLATE utf8mb4_bin');
$alter->statement->options[0]->collation->name?->value // => 'utf8mb4_bin'Properties§
public CollationName $collationMethods§
public function __construct(public CollationName $collation)Parameters
$collation | CollationName | The collation |
public function render(Output $out): voidTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
DatabaseCollationTestcalls