classBareWords
final class BareWords
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): boolTells whether the word is read as one identifier when written without quotes.
Parameters
$word | string |
Returns
boolTest cases 3
Called from 1
Calls 5
- function-call
preg_matchline 37 - method-call Keywords::reserved() line 40
- new Keywords line 40
- function-call
strtrline 44 - method-call BareWords::accepted() line 44
public function accepted(string $keyword): boolTells whether the parser accepts a keyword at a name position.
Parameters
$keyword | string |
Returns
boolTest cases 1
Called from 1
Calls 1
- new SqliteParser line 52
Private surface 2§
Implementation details, listed for orientation only.
private static array<string, bool> $keywords = []private static ?SqliteParser $parser = nullTest cases 4§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.