final class Codec
    implements Codec
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.

Spells decoded names as MySQL identifiers of one grammar release.

Rule: MYSQL-NAME-CODEC-001. A name made of ASCII letters, digits and underscores that starts with a letter and is no keyword, function name or introducer of the release (MYSQL-KEYWORDS-001) is written bare. Every other name is written in backticks with embedded backticks doubled. A backtick word is an identifier under every sql_mode, at every identifier position, after @ and after @@, and it decodes (MYSQL-IDENTIFIER-DECODE-001) to the same name, so the spelling does not depend on ANSI_QUOTES or on the position. A name position that accepts only a string token is not a name of this codec: its structure holds a string literal. Source: https://dev.mysql.com/doc/refman/8.4/en/identifiers.html. Status: Implemented.

Methods§

public function __construct(GrammarRelease $release)

Parameters

$releaseGrammarReleaseThe grammar release whose keywords decide quoting
Calls 1
public function name(Name $name, NameUse $use): string

Private surface 1§

Implementation details, listed for orientation only.

private Keywords $keywords

Test cases 112§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 5
Other tests reaching this symbol 107

Relations§

Instantiated in 2
Type declarations 1