classWordRule
final class WordRule
Lowers identifier tokens at the positions where SQLite reads the written text.
Rule: SQLITE-WORD-LOWER-001. Scope: the name of a table option, the word after a generated column expression and the identifier after DEFAULT. Constructor: Word, holding the decoded name, which is the recorded operand leaf, and the quoting the first character of the token shows. Terminates: one token. Source: https://sqlite.org/lang_keywords.html. Status: Implemented.
Methods§
public function __construct(private Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
Lowers one identifier or string token to a word with its quoting.
Parameters
$token | Token |
Returns
Called from 3
- method-call SqlSemantics\Platform\Sqlite\Lowering\Definition\ColumnRule::default() packages/sql-semantics-sqlite/src/Lowering/Definition/ColumnRule.php:133
- method-call SqlSemantics\Platform\Sqlite\Lowering\Definition\ColumnRule::generated() packages/sql-semantics-sqlite/src/Lowering/Definition/ColumnRule.php:183
- method-call SqlSemantics\Platform\Sqlite\Lowering\Definition\WordRule::name() packages/sql-semantics-sqlite/src/Lowering/Definition/WordRule.php:59
Calls 3
- new Word line 44
- class-const WordRule::QUOTES() line 44
- class-const WordQuote::Bare() line 44
Lowers a name position (nm, one identifier or string token) to a word with its quoting.
Parameters
$name | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 2
- method-call SqlSemantics\Platform\Sqlite\Lowering\Definition\TableConstraintRule::option() packages/sql-semantics-sqlite/src/Lowering/Definition/TableConstraintRule.php:161
- method-call SqlSemantics\Platform\Sqlite\Lowering\Definition\TableConstraintRule::option() packages/sql-semantics-sqlite/src/Lowering/Definition/TableConstraintRule.php:162
Calls 2
- static-call ImplementationGap::production() line 56
- method-call WordRule::word() line 59
Private surface 2§
Implementation details, listed for orientation only.
private const QUOTES = ["'" => \SqlSemantics\Platform\Sqlite\Statement\Lexical\WordQuote::Single, '"' …private Lowering $loweringTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
WordRuleTestcalls
Relations§
Instantiated in 2
- new SqlSemantics\Platform\Sqlite\Lowering\Definition\ColumnRule::__construct() packages/sql-semantics-sqlite/src/Lowering/Definition/ColumnRule.php:54
- new SqlSemantics\Platform\Sqlite\Lowering\Definition\TableConstraintRule::__construct() packages/sql-semantics-sqlite/src/Lowering/Definition/TableConstraintRule.php:53
Method calls 4
- method-call SqlSemantics\Platform\Sqlite\Lowering\Definition\ColumnRule::default() packages/sql-semantics-sqlite/src/Lowering/Definition/ColumnRule.php:133
- method-call SqlSemantics\Platform\Sqlite\Lowering\Definition\ColumnRule::generated() packages/sql-semantics-sqlite/src/Lowering/Definition/ColumnRule.php:183
- method-call SqlSemantics\Platform\Sqlite\Lowering\Definition\TableConstraintRule::option() packages/sql-semantics-sqlite/src/Lowering/Definition/TableConstraintRule.php:161
- method-call SqlSemantics\Platform\Sqlite\Lowering\Definition\TableConstraintRule::option() packages/sql-semantics-sqlite/src/Lowering/Definition/TableConstraintRule.php:162