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

The words the MySQL lexer of one release can read as something other than an identifier.

Rule: MYSQL-KEYWORDS-001. A word is unusable for a bare name when the release lists it as a keyword or as a function name (a function name is a keyword when a parenthesis follows, and under IGNORE_SPACE even after spaces), or when it starts with an underscore, because _charset words are character set introducers. The table is the keyword artifact the language profile pins. Treating every such word as reserved, including those a grammar position would accept bare, makes a bare spelling independent of the position it is written at. Source: https://dev.mysql.com/doc/refman/8.4/en/keywords.html. Status: Implemented.

Methods§

public function __construct(private GrammarRelease $release)

Parameters

$releaseGrammarReleaseThe grammar release whose keyword artifact is read
public function reserved(string $word): bool

Private surface 2§

Implementation details, listed for orientation only.

private static array<string, array<string, true>> $words = []
private GrammarRelease $release

Test cases 5§

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

Dedicated tests 5

Relations§

Instantiated in 1
Method calls 1
Type declarations 1