classValueRule
final class ValueRule
Lowers the value of a variable assignment in SET.
Rule: MYSQL-SET-VALUE-LOWERING-001. Scope: set_expr_or_default. A value is an expression or one of the keywords DEFAULT, ON, ALL, BINARY, ROW and SYSTEM (SetWord). An expression that is nothing but a column name, through the unit productions from expr down to simple_ident, is the bare name whose text a system variable receives (BareName, MYSQL-SET-WORD-001); every other expression is lowered by the expression family. Terminates: the descent follows unit productions of a strict subtree. Source: https://dev.mysql.com/doc/refman/8.4/en/set-variable.html. Status: Implemented.
Methods§
public function __construct(private Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
Lowers a node of set_expr_or_default.
Parameters
$value | Node | |
$system | bool | Whether the assigned variable is known to be a system variable |
Throws
ImplementationGap When a production has no ruleCalled from 3
- method-call SqlSemantics\Platform\MySql\Lowering\Utility\Set\ItemRule::unscoped() packages/sql-semantics-mysql/src/Lowering/Utility/Set/ItemRule.php:84
- method-call SqlSemantics\Platform\MySql\Lowering\Utility\Set\ItemRule::unscoped() packages/sql-semantics-mysql/src/Lowering/Utility/Set/ItemRule.php:88
- method-call SqlSemantics\Platform\MySql\Lowering\Utility\Set\ItemRule::named() packages/sql-semantics-mysql/src/Lowering/Utility/Set/ItemRule.php:149
Calls 4
- method-call Lowering::form() line 61
- class-const ValueRule::WORDS() line 63
- static-call ImplementationGap::production() line 63
- method-call ValueRule::word() line 66
Lowers an expression that is nothing but a column name into a word; any other expression is null.
Parameters
$expression | Node | |
$system | bool |
Returns
Called from 1
Calls 7
- class-const ValueRule::UNITS() line 75
- function-call
countline 75 - function-call
array_filterline 87 - function-call
array_mapline 90 - function-call
array_popline 91 - new QualifiedName line 94
- new BareName line 98
Private surface 3§
Implementation details, listed for orientation only.
private const WORDS = ['set_expr_or_default: DEFAULT' => \SqlSemantics\Platform\MySql\Statement\Utili…private const UNITS = ['expr' => true, 'bool_pri' => true, 'predicate' => true, 'bit_expr' => true, '…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
ValueRuleTestcalls
Relations§
Instantiated in 2
Method calls 3
- method-call SqlSemantics\Platform\MySql\Lowering\Utility\Set\ItemRule::unscoped() packages/sql-semantics-mysql/src/Lowering/Utility/Set/ItemRule.php:84
- method-call SqlSemantics\Platform\MySql\Lowering\Utility\Set\ItemRule::unscoped() packages/sql-semantics-mysql/src/Lowering/Utility/Set/ItemRule.php:88
- method-call SqlSemantics\Platform\MySql\Lowering\Utility\Set\ItemRule::named() packages/sql-semantics-mysql/src/Lowering/Utility/Set/ItemRule.php:149