classIntroducers
final class Introducers
The character set names a string, hexadecimal or bit literal may be introduced with.
Rule: MYSQL-INTRODUCER-001. _name before a literal is a character set introducer only when the name is a character set the server compiles in; any other such word is an identifier. The list is the one the lexer of the pinned parser uses for MySQL 5.6 through 9.1. Names are compared without regard to ASCII case and held in lower case. Source: https://dev.mysql.com/doc/refman/8.4/en/charset-introducer.html. Status: Implemented.
Methods§
public function charset(string $token): stringAnswers the character set an introducer token names, in lower case.
Parameters
$token | string |
Returns
stringTest cases 2
Called from 2
public function known(string $name): boolTells whether a lower-case name can be written as an introducer.
Parameters
$name | string |
Returns
boolTest cases 2
Called from 2
- method-call SqlSemantics\Platform\MySql\Statement\Literal\RadixLiteral::__construct() packages/sql-semantics-mysql/src/Statement/Literal/RadixLiteral.php:59
- method-call SqlSemantics\Platform\MySql\Statement\Literal\StringLiteral::__construct() packages/sql-semantics-mysql/src/Statement/Literal/StringLiteral.php:71
Calls 2
- function-call
in_arrayline 46 - class-const Introducers::NAMES() line 46
Private surface 1§
Implementation details, listed for orientation only.
private const NAMES = ['armscii8', 'ascii', 'big5', 'binary', 'cp1250', 'cp1251', 'cp1256', 'cp1257',…Test cases 3§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Relations§
Instantiated in 4
- new SqlSemantics\Platform\MySql\Lowering\Leaf\LiteralRule::introducer() packages/sql-semantics-mysql/src/Lowering/Leaf/LiteralRule.php:208
- new SqlSemantics\Platform\MySql\Rules\LeafKeys::terminal() packages/sql-semantics-mysql/src/Rules/LeafKeys.php:114
- new SqlSemantics\Platform\MySql\Statement\Literal\RadixLiteral::__construct() packages/sql-semantics-mysql/src/Statement/Literal/RadixLiteral.php:59
- new SqlSemantics\Platform\MySql\Statement\Literal\StringLiteral::__construct() packages/sql-semantics-mysql/src/Statement/Literal/StringLiteral.php:71
Method calls 4
- method-call SqlSemantics\Platform\MySql\Lowering\Leaf\LiteralRule::introducer() packages/sql-semantics-mysql/src/Lowering/Leaf/LiteralRule.php:208
- method-call SqlSemantics\Platform\MySql\Rules\LeafKeys::terminal() packages/sql-semantics-mysql/src/Rules/LeafKeys.php:114
- method-call SqlSemantics\Platform\MySql\Statement\Literal\RadixLiteral::__construct() packages/sql-semantics-mysql/src/Statement/Literal/RadixLiteral.php:59
- method-call SqlSemantics\Platform\MySql\Statement\Literal\StringLiteral::__construct() packages/sql-semantics-mysql/src/Statement/Literal/StringLiteral.php:71