classIdentifiers
final class Identifiers
Restricted visibility: declared "@visibility SqlSemantics\Platform\Sqlite". Code outside that scope must not name this declaration.
Decodes the spelling of a SQLite identifier token.
Rule: SQLITE-IDENTIFIER-DECODE-001. A word in double quotes, backticks or single quotes is the text between them with each doubled quote read as one; a word in square brackets is the text between them; any other word is the name as written. Letter case is kept, because SQLite keeps it and compares names without regard to ASCII case. Source: https://sqlite.org/lang_keywords.html. Status: Implemented.
Methods§
public function decode(string $text): stringDecodes an identifier token text to the name it denotes.
Parameters
$text | string |
Returns
stringTest cases 5
IdentifiersTest::testDecodeKeepsABareWordAsWrittenWithItsCasecallsIdentifiersTest::testDecodeReadsTheTextBetweenBackticksWithDoubledBackticksAsOnecallsIdentifiersTest::testDecodeReadsTheTextBetweenDoubleQuotesWithDoubledQuotesAsOnecallsIdentifiersTest::testDecodeReadsTheTextBetweenSingleQuotesWithDoubledQuotesAsOnecallsIdentifiersTest::testDecodeReadsTheTextBetweenSquareBracketsWithoutUndoublingcalls
Called from 5
- method-call SqlSemantics\Platform\Sqlite\Lowering\Leaf\LiteralRule::term() packages/sql-semantics-sqlite/src/Lowering/Leaf/LiteralRule.php:57
- method-call SqlSemantics\Platform\Sqlite\Lowering\Leaf\NameRule::token() packages/sql-semantics-sqlite/src/Lowering/Leaf/NameRule.php:57
- method-call SqlSemantics\Platform\Sqlite\Rules\LeafKeys::key() packages/sql-semantics-sqlite/src/Rules/LeafKeys.php:64
- method-call SqlSemantics\Platform\Sqlite\Rules\LeafKeys::word() packages/sql-semantics-sqlite/src/Rules/LeafKeys.php:75
- method-call SqlSemantics\Platform\Sqlite\Rules\LeafKeys::literal() packages/sql-semantics-sqlite/src/Rules/LeafKeys.php:89
Test cases 5§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 5
IdentifiersTest::testDecodeKeepsABareWordAsWrittenWithItsCasecallsIdentifiersTest::testDecodeReadsTheTextBetweenBackticksWithDoubledBackticksAsOnecallsIdentifiersTest::testDecodeReadsTheTextBetweenDoubleQuotesWithDoubledQuotesAsOnecallsIdentifiersTest::testDecodeReadsTheTextBetweenSingleQuotesWithDoubledQuotesAsOnecallsIdentifiersTest::testDecodeReadsTheTextBetweenSquareBracketsWithoutUndoublingcalls
Relations§
Instantiated in 5
- new SqlSemantics\Platform\Sqlite\Lowering\Leaf\LiteralRule::term() packages/sql-semantics-sqlite/src/Lowering/Leaf/LiteralRule.php:57
- new SqlSemantics\Platform\Sqlite\Lowering\Leaf\NameRule::token() packages/sql-semantics-sqlite/src/Lowering/Leaf/NameRule.php:57
- new SqlSemantics\Platform\Sqlite\Rules\LeafKeys::key() packages/sql-semantics-sqlite/src/Rules/LeafKeys.php:64
- new SqlSemantics\Platform\Sqlite\Rules\LeafKeys::word() packages/sql-semantics-sqlite/src/Rules/LeafKeys.php:75
- new SqlSemantics\Platform\Sqlite\Rules\LeafKeys::literal() packages/sql-semantics-sqlite/src/Rules/LeafKeys.php:89
Method calls 5
- method-call SqlSemantics\Platform\Sqlite\Lowering\Leaf\LiteralRule::term() packages/sql-semantics-sqlite/src/Lowering/Leaf/LiteralRule.php:57
- method-call SqlSemantics\Platform\Sqlite\Lowering\Leaf\NameRule::token() packages/sql-semantics-sqlite/src/Lowering/Leaf/NameRule.php:57
- method-call SqlSemantics\Platform\Sqlite\Rules\LeafKeys::key() packages/sql-semantics-sqlite/src/Rules/LeafKeys.php:64
- method-call SqlSemantics\Platform\Sqlite\Rules\LeafKeys::word() packages/sql-semantics-sqlite/src/Rules/LeafKeys.php:75
- method-call SqlSemantics\Platform\Sqlite\Rules\LeafKeys::literal() packages/sql-semantics-sqlite/src/Rules/LeafKeys.php:89