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

Lowers SET statements: the assignment list, SET TRANSACTION, and the routing of SET PASSWORD.

Rule: MYSQL-SET-LOWERING-001. Scope: set, start_option_value_list, start_option_value_list_following_option_type, option_value_list_continued, option_value_list, option_value, option_type, transaction_characteristics, transaction_access_mode, isolation_level, transaction_access_mode_types, isolation_types, opt_transaction_access_mode, opt_isolation_level. Constructs: SetVariables, SetTransaction. The PASSWORD forms of start_option_value_list, and a MySQL 5.6 list whose only item is a password, are the account statement SET PASSWORD and go to the account family. The items are lowered by MYSQL-SET-ITEM-LOWERING-001. LOCAL is the scope SESSION (UtilityNoise). Terminates: the list spine is flattened iteratively and every item is a strict subtree. Source: https://dev.mysql.com/doc/refman/8.4/en/set-variable.html, https://dev.mysql.com/doc/refman/8.4/en/set-transaction.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function unscoped(Form $list): Statement

Lowers a list that starts without a scope keyword; a MySQL 5.6 list of one password is SET PASSWORD.

Parameters

$listForm

Returns

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 7
public function scoped(VariableScope $scope, Form $form): Statement
public function characteristics(Node $characteristics): list<IsolationLevel|AccessMode>
public function optional(Node $optional): list<IsolationLevel|AccessMode>

Lowers the optional second characteristic: a node of opt_isolation_level or opt_transaction_access_mode.

Parameters

$optionalNode

Throws

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

Private surface 4§

Implementation details, listed for orientation only.

private const SCOPES = ['option_type: GLOBAL_SYM' => \SqlSemantics\Platform\MySql\Statement\Variable\V…
private const PASSWORDS = ['start_option_value_list: PASSWORD equal password' => true, 'start_option_valu…
private const LEVELS = ['isolation_types: READ_SYM UNCOMMITTED_SYM' => \SqlSemantics\Platform\MySql\St…
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 1
Method calls 1