classCollationName
final class CollationName
implements Node
uses Snapshot
Public API: explicitly declared with
@visibility public.A collation at a position that names one: a collation name or the keyword DEFAULT.
Collation names are compared without regard to letter case; the name is kept as written. The keyword BINARY at such a position is the collation name binary. Source: https://dev.mysql.com/doc/refman/8.4/en/charset-collation-names.html.
$named = new \SqlSemantics\Platform\MySql\Statement\Name\CollationName(new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('utf8mb4_bin'));
[$named->name?->value, (new \SqlSemantics\Platform\MySql\Statement\Name\CollationName(null))->name] // => ['utf8mb4_bin', null]Properties§
public Name|null $nameMethods§
public function __construct(public Name|null $name)Parameters
$name | Name|null | The collation name, or null for the keyword DEFAULT |
public function render(Output $out): voidWrites the name or the keyword DEFAULT.
Parameters
$out | Output |
Test cases 2
Calls 3
- method-call Output::keyword() line 43
- method-call Output::name() line 45
- class-const NameUse::Label() line 45
Test cases 6§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 2
Other tests reaching this symbol 4
Relations§
Instantiated in 2
Type declarations 13
- type SqlSemantics\Platform\MySql\Lowering\Leaf\CharsetRule packages/sql-semantics-mysql/src/Lowering/Leaf/CharsetRule.php:111
- type SqlSemantics\Platform\MySql\Lowering\TableDefinition\Column\AttributeRule packages/sql-semantics-mysql/src/Lowering/TableDefinition/Column/AttributeRule.php:169
- type SqlSemantics\Platform\MySql\Rules\Routine\ProgramNames packages/sql-semantics-mysql/src/Rules/Routine/ProgramNames.php:63
- type SqlSemantics\Platform\MySql\Statement\Alter\Command\ConvertCharset packages/sql-semantics-mysql/src/Statement/Alter/Command/ConvertCharset.php:36
- type SqlSemantics\Platform\MySql\Statement\Call\Json\PathColumn packages/sql-semantics-mysql/src/Statement/Call/Json/PathColumn.php:60
- type SqlSemantics\Platform\MySql\Statement\Routine\CreateFunction packages/sql-semantics-mysql/src/Statement/Routine/CreateFunction.php:65
- type SqlSemantics\Platform\MySql\Statement\Routine\Parameter packages/sql-semantics-mysql/src/Statement/Routine/Parameter.php:39
- type SqlSemantics\Platform\MySql\Statement\Routine\Program\VariableDeclaration packages/sql-semantics-mysql/src/Statement/Routine/Program/VariableDeclaration.php:58
- type SqlSemantics\Platform\MySql\Statement\Server\Database\DatabaseCollation packages/sql-semantics-mysql/src/Statement/Server/Database/DatabaseCollation.php:31
- type SqlSemantics\Platform\MySql\Statement\Table\Column\CollateAttribute packages/sql-semantics-mysql/src/Statement/Table/Column/CollateAttribute.php:30
- type SqlSemantics\Platform\MySql\Statement\Table\Column\GeneratedColumn packages/sql-semantics-mysql/src/Statement/Table/Column/GeneratedColumn.php:53
- type SqlSemantics\Platform\MySql\Statement\Table\Option\CollationOption packages/sql-semantics-mysql/src/Statement/Table/Option/CollationOption.php:30
- type SqlSemantics\Platform\MySql\Statement\Utility\Set\SetNames packages/sql-semantics-mysql/src/Statement/Utility/Set/SetNames.php:40