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

Keys SQLite tokens for the token correspondence check.

Rule: SQLITE-LEAF-KEYS-001. A token at an identifier position is keyed by its decoded name, so equivalent spellings of one name are equal. An unqualified word used as a value is keyed apart when it is written in double quotes or is the bare word TRUE or FALSE, because those are other requests than a column use. A word before JOIN that is written as a join keyword is keyed as that keyword. A string is keyed by its decoded text, a BLOB by its hexadecimal digits, a number by its spelling without digit separators and without regard to case, a bind parameter by its exact text. Every other token is keyed by its terminal and its text without regard to ASCII case, so = and == stay different. The positions and synonyms of Noise are the only exceptions. The keys of the words before JOIN depend on the production read just before them, so one instance keys one token sequence at a time, in order. Status: Implemented.

Methods§

public function key(Token $token, string $signature, int $position): ?string
public function word(Token $token): string

Keys an unqualified word used as a value by the request it is.

Parameters

$tokenToken

Returns

string
Test cases 2
Called from 1
Calls 5
public function literal(Token $token): string

Private surface 3§

Implementation details, listed for orientation only.

private const IDENTIFIERS = ['idj', 'ids', 'id', 'nm: STRING']
private array<string, list<string>> $symbols = []
private int $joinWords = 0

Test cases 19§

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

Dedicated tests 14
Other tests reaching this symbol 5

Relations§

Instantiated in 1
Type declarations 1