classIdentifiers
final class Identifiers
Decodes the spelling of a MySQL identifier token.
Rule: MYSQL-IDENTIFIER-DECODE-001. Scope: the terminals IDENT and IDENT_QUOTED of every release. A word in backticks is the text between them with each doubled backtick read as one; under ANSI_QUOTES a word in double quotes is the text between them with each doubled double quote read as one; any other word, including one made of digits and letters or of bytes above 0x7F, is the name as written. No backslash escape exists in an identifier. Letter case is kept, because the server keeps it and compares names by the rules of each name space. Precision: exact for every token the lexer produces. Terminates: one pass over the token text. Source: https://dev.mysql.com/doc/refman/8.4/en/identifiers.html. Status: Implemented.
Methods§
public function decode(string $text): stringDecodes an identifier token text to the name it denotes.
Parameters
$text | string |
Returns
stringTest cases 3
Called from 3
- method-call SqlSemantics\Platform\MySql\Lowering\Leaf\NameRule::identifier() packages/sql-semantics-mysql/src/Lowering/Leaf/NameRule.php:130
- method-call SqlSemantics\Platform\MySql\Rules\LeafKeys::name() packages/sql-semantics-mysql/src/Rules/LeafKeys.php:98
- method-call SqlSemantics\Platform\MySql\Rules\LeafKeys::terminal() packages/sql-semantics-mysql/src/Rules/LeafKeys.php:110
Test cases 3§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Relations§
Instantiated in 3
- new SqlSemantics\Platform\MySql\Lowering\Leaf\NameRule::identifier() packages/sql-semantics-mysql/src/Lowering/Leaf/NameRule.php:130
- new SqlSemantics\Platform\MySql\Rules\LeafKeys::name() packages/sql-semantics-mysql/src/Rules/LeafKeys.php:98
- new SqlSemantics\Platform\MySql\Rules\LeafKeys::terminal() packages/sql-semantics-mysql/src/Rules/LeafKeys.php:110
Method calls 3
- method-call SqlSemantics\Platform\MySql\Lowering\Leaf\NameRule::identifier() packages/sql-semantics-mysql/src/Lowering/Leaf/NameRule.php:130
- method-call SqlSemantics\Platform\MySql\Rules\LeafKeys::name() packages/sql-semantics-mysql/src/Rules/LeafKeys.php:98
- method-call SqlSemantics\Platform\MySql\Rules\LeafKeys::terminal() packages/sql-semantics-mysql/src/Rules/LeafKeys.php:110