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

Lowers values and assignments: the expression lists of rows and the SET lists.

Rule: MYSQL-DML-VALUES-001. Scope: opt_values, values, expr_or_default, update_list, update_elem, insert_update_list, insert_update_elem, ident_eq_list, ident_eq_value. A value is an expression or the keyword DEFAULT (DefaultRequest); an assignment is a column and a value (Assignment), with = and := as one operator. Terminates: lists are flattened by MYSQL-DML-LIST-001, expressions are strict subtrees. Source: https://dev.mysql.com/doc/refman/8.4/en/insert.html, https://dev.mysql.com/doc/refman/8.4/en/update.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function row(Node $values): list<Scalar>

Lowers the values of one row: a node of opt_values or values.

Parameters

$valuesNode

Returns

list<Scalar>

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 4
public function assignment(Node $assignment): Assignment

Lowers one assignment: a node of update_elem, insert_update_elem or ident_eq_value.

Parameters

$assignmentNode

Returns

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 5

Private surface 3§

Implementation details, listed for orientation only.

private const ASSIGNMENT_LISTS = ['update_list: update_list , update_elem', 'update_list: update_elem', 'insert_…
private const ASSIGNMENTS = ['update_elem: simple_ident_nospvar equal expr_or_default' => true, 'insert_upd…
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 6
Method calls 7