classBitRule
final class BitRule
Lowers the bit_expr level: the arithmetic and bit operators and interval arithmetic.
Rule: MYSQL-BIT-EXPR-001. Scope: bit_expr. Every operator production is left recursive; the left spine is walked in a loop and the operations are built from the innermost outwards. % and MOD are one operator. Constructs: Arithmetic, IntervalArithmetic. 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/arithmetic-functions.html, https://dev.mysql.com/doc/refman/8.4/en/bit-functions.html. Status: Implemented.
Methods§
public function __construct(private Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
Lowers a node of bit_expr.
Parameters
$expression | Node |
Returns
Throws
ImplementationGap When a production has no ruleTest cases 1
Called from 4
- method-call SqlSemantics\Platform\MySql\Lowering\Expression\BitRule::bitExpression() packages/sql-semantics-mysql/src/Lowering/Expression/BitRule.php:76
- method-call SqlSemantics\Platform\MySql\Lowering\Expression\ExpressionRules::bitExpression() packages/sql-semantics-mysql/src/Lowering/Expression/ExpressionRules.php:54
- method-call SqlSemantics\Platform\MySql\Lowering\Expression\PredicateRule::predicate() packages/sql-semantics-mysql/src/Lowering/Expression/PredicateRule.php:66
- method-call SqlSemantics\Platform\MySql\Lowering\Expression\PredicateRule::predicate() packages/sql-semantics-mysql/src/Lowering/Expression/PredicateRule.php:74
Calls 8
- method-call Lowering::form() line 63
- class-const BitRule::OPERATORS() line 64
- class-const BitRule::INTERVALS() line 64
- static-call ImplementationGap::production() line 69
- function-call
array_reverseline 72 - new IntervalArithmetic line 75
- new Arithmetic line 76
- method-call BitRule::bitExpression() line 76
Private surface 3§
Implementation details, listed for orientation only.
private const OPERATORS = ['bit_expr: bit_expr | bit_expr' => \SqlSemantics\Platform\MySql\Statement\Expr…private const INTERVALS = ['bit_expr: bit_expr + INTERVAL_SYM expr interval' => false, 'bit_expr: bit_exp…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
Relations§
Instantiated in 2
- new SqlSemantics\Platform\MySql\Lowering\Expression\ExpressionRules::bitExpression() packages/sql-semantics-mysql/src/Lowering/Expression/ExpressionRules.php:54
- new SqlSemantics\Platform\MySql\Lowering\Expression\PredicateRule::predicate() packages/sql-semantics-mysql/src/Lowering/Expression/PredicateRule.php:64
Method calls 3
- method-call SqlSemantics\Platform\MySql\Lowering\Expression\ExpressionRules::bitExpression() packages/sql-semantics-mysql/src/Lowering/Expression/ExpressionRules.php:54
- method-call SqlSemantics\Platform\MySql\Lowering\Expression\PredicateRule::predicate() packages/sql-semantics-mysql/src/Lowering/Expression/PredicateRule.php:66
- method-call SqlSemantics\Platform\MySql\Lowering\Expression\PredicateRule::predicate() packages/sql-semantics-mysql/src/Lowering/Expression/PredicateRule.php:74