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

Decides whether a word can be written without quotes where SQLite reads a name.

Rule: SQLITE-BARE-WORD-001. A bare word starts with an ASCII letter, an underscore or a byte above 0x7F and continues with those, ASCII digits and $. A keyword is usable only when the grammar lets it fall back to an identifier, which is decided by parsing the word as a savepoint name. Terminates: one pattern match and at most one parse of a two-word text. Source: https://sqlite.org/lang_keywords.html. Status: Implemented.

Methods§

public function usable(string $word): bool
public function accepted(string $keyword): bool

Tells whether the parser accepts a keyword at a name position.

Parameters

$keywordstring

Returns

bool
Test cases 1
Called from 1
Calls 1

Private surface 2§

Implementation details, listed for orientation only.

private static array<string, bool> $keywords = []
private static ?SqliteParser $parser = null

Test cases 4§

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

Dedicated tests 4

Relations§

Instantiated in 1
Method calls 1