classFromRule
final class FromRule
Lowers FROM clauses into input relations.
Rule: SQLITE-FROM-LOWER-001. Scope: from, seltablist, stl_prefix, joinop, on_using, indexed_opt, indexed_by. One term without a constraint is that term; anything else is a chain of the terms in written order, each with the operator before it and the constraint after it. A word before JOIN is a join keyword when it is written as one and a name otherwise. Terminates: the term list is walked along its spine in a loop; recursion follows parentheses. Source: https://sqlite.org/lang_select.html#the_from_clause. Status: Implemented.
Methods§
public function __construct(private Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
Lowers a from: the input relation, or null when the clause is absent.
Parameters
$from | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalls 2
- method-call FromRule::terms() line 59
- static-call ImplementationGap::production() line 60
Lowers a seltablist: one term, or the chain of its terms.
Parameters
$list | Node |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 2
Calls 9
- static-call ImplementationGap::production() line 81
- function-call
array_reverseline 87 - method-call FromRule::operator() line 88
- method-call FromRule::term() line 89
- method-call FromRule::constraint() line 90
- function-call
countline 90 - new JoinStep line 94
- static-call ImplementationGap::rule() line 98
- new JoinChain line 101
Lowers the relation of one term.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 8
- new TableInput line 114
- method-call Form::node() line 114
- method-call FromRule::indexed() line 115
- new TableCall line 116
- new DerivedQuery line 117
- new NestedInput line 118
- method-call FromRule::terms() line 118
- static-call ImplementationGap::production() line 119
public function operator(Node $operator): JoinOperatorLowers a joinop.
Parameters
$operator | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 5
- new JoinOperator line 132
- static-call JoinKeyword::from() line 135
- function-call
strtoupperline 135 - method-call FromRule::word() line 136
- static-call ImplementationGap::production() line 138
public function word(Node $name): JoinKeyword|NameLowers a word written before JOIN: a join keyword when it is written as one, a name otherwise.
Parameters
$name | Node |
Returns
Called from 2
Calls 2
- static-call JoinKeyword::tryFrom() line 150
- function-call
strtoupperline 150
Lowers an on_using: the constraint, or null when none is written.
Parameters
$constraint | Node |
Throws
ImplementationGap When the production has no ruleCalled from 1
public function indexed(Node $clause): IndexChoiceLowers an indexed_by.
Parameters
$clause | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 2
Calls 2
- new IndexChoice line 182
- static-call ImplementationGap::production() line 184
public function optionalIndexed(Node $clause): ?IndexChoiceLowers an indexed_opt: the index choice, or null when none is written.
Parameters
$clause | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalls 2
- method-call FromRule::indexed() line 199
- static-call ImplementationGap::production() line 200
Private surface 1§
Implementation details, listed for orientation only.
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
FromRuleTestcalls