final class ConditionRule
Restricted visibility: declared "@visibility SqlSemantics\Platform\MySql". Code outside that scope must not name this declaration.

Lowers the expr and bool_pri levels: logical operators, NOT, truth tests, NULL tests and comparisons.

Rule: MYSQL-CONDITION-001. Scope: expr, bool_pri, or, and, comp_op, all_or_any. The binary operators of each level are left recursive; the left spine is walked in a loop and the operations are built from the innermost outwards, so the structure associates as the grammar does. && is AND and || without PIPES_AS_CONCAT is OR (their nonterminals are synonyms); SOME is the keyword ANY. Constructs: Logical, Not, TruthTest, NullTest, Comparison, QuantifiedComparison. Terminates: the spine loop descends one left child per step; every other child is a strict subtree. Source: https://dev.mysql.com/doc/refman/8.4/en/expressions.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function negatedNull(Form $form, Scalar $left): NullTest
public function synonym(Node $keyword): void

Private surface 7§

Implementation details, listed for orientation only.

private const LOGICAL = ['expr: expr or expr' => \SqlSemantics\Platform\MySql\Statement\Expression\Logi…
private const TRUTH = ['expr: bool_pri IS TRUE_SYM' => [\SqlSemantics\Platform\MySql\Statement\Expres…
private const BOOL_PRI = ['bool_pri: bool_pri IS NULL_SYM' => true, 'bool_pri: bool_pri IS not NULL_SYM'…
private const OPERATORS = ['comp_op: EQ' => \SqlSemantics\Platform\MySql\Statement\Expression\ComparisonO…
private const QUANTIFIERS = ['all_or_any: ALL' => \SqlSemantics\Platform\MySql\Statement\Expression\Subquer…
private const SYNONYMS = ['or: OR_SYM' => true, 'or: OR2_SYM' => true, 'and: AND_SYM' => true, 'and: AND…
private Lowering $lowering

Test cases 8§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 8

Relations§

Instantiated in 1
Method calls 1