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.

Reading the collationdoctest
$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 $collation

Methods§

public function __construct(public CollationName $collation)

Parameters

$collationCollationNameThe collation
public function render(Output $out): void

Writes the option.

Parameters

$outOutput
Calls 1

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