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

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

$loweringLoweringThe lowering this rule belongs to
public function word(Node $expression, bool $system): ?BareName

Lowers an expression that is nothing but a column name into a word; any other expression is null.

Parameters

$expressionNode
$systembool

Returns

Called from 1
Calls 7

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 $lowering

Test 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
Method calls 3