classStatementKindReader
final class StatementKindReader
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
Reads what a statement does from the keyword it leads with.
Methods§
public function __construct(?SqlLexer $lexer = null)public function read(TextPattern $pattern): StatementKindWhat the statement does, or Unknown when the leading keyword is missing or hidden by a gap.
Parameters
$pattern | TextPattern |
Returns
Test cases 2
Called from 2
Calls 10
- method-call SqlLexer::tokenize() line 68
- method-call TextPattern::render() line 68
- class-const PlaceholderScanner::HOLE_MARKER() line 68
- class-const SqlTokenKind::Comment() line 70
- class-const SqlTokenKind::Word() line 73
- class-const SqlTokenKind::Symbol() line 74
- class-const StatementKind::Unknown() line 78
- method-call StatementKindReader::readAfterCommonTable() line 81
- function-call
array_sliceline 81 - class-const StatementKindReader::KEYWORDS() line 84
public function readAfterCommonTable(list<SqlToken> $tokens): StatementKindWhat the statement a WITH clause introduces does.
Parameters
$tokens | list<SqlToken> |
Returns
Test cases 1
Called from 1
Calls 6
- class-const SqlTokenKind::Word() line 98
- class-const StatementKind::Select() line 102
- class-const StatementKind::Insert() line 103
- class-const StatementKind::Update() line 104
- class-const StatementKind::Delete() line 105
- class-const StatementKind::Unknown() line 113
Private surface 2§
Implementation details, listed for orientation only.
private const KEYWORDS = ['SELECT' => \SqlCatalog\Core\Sql\StatementKind::Select, 'TABLE' => \SqlCatalog…private SqlLexer $lexerTest cases 10§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 3
Other tests reaching this symbol 7
CatalogCommandTestcallsEntryFactoryTestcallsExpressionEvaluatorTestcallsCallModelTestcallsAnalyzerTestcallsJsonReporterTestcallsTextReporterTestcalls