classPredicateRule
final class PredicateRule
Lowers the predicate productions: NULL tests, pattern matches, range tests and membership tests.
Rule: SQLITE-EXPR-PREDICATE-001. Scope: the expr productions of ISNULL, NOTNULL, NOT NULL, the pattern operators, BETWEEN and IN; likeop, between_op, in_op. A written NOT is kept as the negation of the predicate. Terminates: every operand is a strict subtree. Source: https://sqlite.org/lang_expr.html. Status: Implemented.
Methods§
public function __construct(private Lowering $lowering)Lowers a predicate, or passes the form on to the function call rules.
Parameters
$form | Form |
Returns
Called from 1
Calls 13
- new NullTest line 52
- method-call Form::node() line 52
- method-call Form::token() line 52
- class-const NullTestForm::IsNull() line 52
- class-const NullTestForm::NotNull() line 52
- class-const NullTestForm::NotNullWords() line 53
- method-call PredicateRule::match() line 54
- new Between line 56
- method-call PredicateRule::negated() line 56
- new InList line 57
- new InQuery line 58
- new InTable line 59
- method-call CallRule::expression() line 60
public function match(Form $form, ?Node $escape): PatternMatchLowers a pattern match with its optional escape operand.
Returns
Throws
ImplementationGap When the production has no ruleCalled from 2
- method-call SqlSemantics\Platform\Sqlite\Lowering\Expression\PredicateRule::expression() packages/sql-semantics-sqlite/src/Lowering/Expression/PredicateRule.php:54
- method-call SqlSemantics\Platform\Sqlite\Lowering\Expression\PredicateRule::expression() packages/sql-semantics-sqlite/src/Lowering/Expression/PredicateRule.php:55
Calls 5
- method-call Form::node() line 72
- static-call ImplementationGap::production() line 76
- new PatternMatch line 79
- static-call PatternOperator::from() line 80
- function-call
strtoupperline 80
public function negated(Node $operator): boolTells whether a BETWEEN or IN operator is written with NOT.
Parameters
$operator | Node |
Returns
boolThrows
ImplementationGap When the production has no ruleCalled from 4
- method-call SqlSemantics\Platform\Sqlite\Lowering\Expression\PredicateRule::expression() packages/sql-semantics-sqlite/src/Lowering/Expression/PredicateRule.php:56
- method-call SqlSemantics\Platform\Sqlite\Lowering\Expression\PredicateRule::expression() packages/sql-semantics-sqlite/src/Lowering/Expression/PredicateRule.php:57
- method-call SqlSemantics\Platform\Sqlite\Lowering\Expression\PredicateRule::expression() packages/sql-semantics-sqlite/src/Lowering/Expression/PredicateRule.php:58
- method-call SqlSemantics\Platform\Sqlite\Lowering\Expression\PredicateRule::expression() packages/sql-semantics-sqlite/src/Lowering/Expression/PredicateRule.php:59
Calls 1
- static-call ImplementationGap::production() line 100
Private surface 2§
Implementation details, listed for orientation only.
private CallRule $callsprivate 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
PredicateRuleTestcalls