classCharsetName
final class CharsetName
implements Node
uses Snapshot
Public API: explicitly declared with
@visibility public.A character set at a position that names one: a character set name or the keyword DEFAULT.
Character set names are compared without regard to letter case; the name is kept as written. The keyword BINARY at such a position is the name binary. Source: https://dev.mysql.com/doc/refman/8.4/en/charset-charsets.html.
$named = new \SqlSemantics\Platform\MySql\Statement\Name\CharsetName(new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('utf8mb4'));
[$named->name?->value, (new \SqlSemantics\Platform\MySql\Statement\Name\CharsetName(null))->name] // => ['utf8mb4', null]Properties§
public Name|null $nameMethods§
public function __construct(public Name|null $name)Parameters
$name | Name|null | The character set 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 3
- new SqlSemantics\Platform\MySql\Lowering\Leaf\CharsetRule::charset() packages/sql-semantics-mysql/src/Lowering/Leaf/CharsetRule.php:100
- new SqlSemantics\Platform\MySql\Lowering\TableChange\Alter\ItemRule::convert() packages/sql-semantics-mysql/src/Lowering/TableChange/Alter/ItemRule.php:212
- new SqlSemantics\Platform\MySql\Lowering\Utility\Set\ItemRule::connection() packages/sql-semantics-mysql/src/Lowering/Utility/Set/ItemRule.php:112
Type declarations 11
- type SqlSemantics\Platform\MySql\Lowering\Dml\FormatRule packages/sql-semantics-mysql/src/Lowering/Dml/FormatRule.php:55
- type SqlSemantics\Platform\MySql\Lowering\Leaf\CharsetRule packages/sql-semantics-mysql/src/Lowering/Leaf/CharsetRule.php:96
- 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\CharCall packages/sql-semantics-mysql/src/Statement/Call/CharCall.php:47
- type SqlSemantics\Platform\MySql\Statement\Dml\Load\LoadTable packages/sql-semantics-mysql/src/Statement/Dml/Load/LoadTable.php:84
- type SqlSemantics\Platform\MySql\Statement\Dml\Load\TextFileFormat packages/sql-semantics-mysql/src/Statement/Dml/Load/TextFileFormat.php:46
- type SqlSemantics\Platform\MySql\Statement\Expression\Conversion\CharsetConversion packages/sql-semantics-mysql/src/Statement/Expression/Conversion/CharsetConversion.php:46
- type SqlSemantics\Platform\MySql\Statement\Server\Database\DatabaseCharset packages/sql-semantics-mysql/src/Statement/Server/Database/DatabaseCharset.php:34
- type SqlSemantics\Platform\MySql\Statement\Table\Option\CharsetOption packages/sql-semantics-mysql/src/Statement/Table/Option/CharsetOption.php:30
- type SqlSemantics\Platform\MySql\Statement\Utility\Set\SetCharacterSet packages/sql-semantics-mysql/src/Statement/Utility/Set/SetCharacterSet.php:36
- type SqlSemantics\Platform\MySql\Statement\Utility\Set\SetNames packages/sql-semantics-mysql/src/Statement/Utility/Set/SetNames.php:40