classSetRule
final class SetRule
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
$lowering | Lowering | The lowering this rule belongs to |
Lowers a node of set.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 9
- static-call ImplementationGap::production() line 86
- method-call Lowering::form() line 88
- method-call Form::node() line 88
- class-const SetRule::PASSWORDS() line 89
- method-call SetRule::unscoped() line 94
- new SetTransaction line 95
- method-call SetRule::characteristics() line 95
- method-call SetRule::scoped() line 96
- method-call SetRule::scope() line 96
Lowers a list that starts without a scope keyword; a MySQL 5.6 list of one password is SET PASSWORD.
Parameters
$list | Form |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 7
- new ItemRule line 108
- method-call Lowering::form() line 109
- method-call Form::node() line 109
- method-call ItemRule::password() line 111
- new SetVariables line 115
- method-call ItemRule::unscoped() line 115
- method-call SetRule::continued() line 115
public function scoped(VariableScope $scope, Form $form): StatementLowers the rest of a statement after a leading scope keyword.
Parameters
$scope | VariableScope | |
$form | Form |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 9
- new SetVariables line 126
- method-call ItemRule::scoped() line 127
- new ItemRule line 127
- method-call Lowering::form() line 127
- method-call Form::node() line 127
- method-call SetRule::continued() line 128
- new SetTransaction line 130
- method-call SetRule::characteristics() line 130
- static-call ImplementationGap::production() line 131
Lowers the items after the first: a node of option_value_list_continued.
Parameters
$form | Form |
Returns
list<SetItem>Throws
ImplementationGap When a production has no ruleCalled from 2
Calls 9
- static-call ImplementationGap::production() line 147
- new ItemRule line 149
- method-call Form::node() line 151
- method-call Lowering::form() line 152
- method-call Lists::items() line 157
- new Lists line 157
- method-call ItemRule::scoped() line 160
- method-call SetRule::scope() line 160
- method-call ItemRule::unscoped() line 161
public function scope(Node $type): VariableScopeLowers a scope keyword: a node of option_type.
Parameters
$type | Node |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 2
- method-call SqlSemantics\Platform\MySql\Lowering\Utility\Set\SetRule::statement() packages/sql-semantics-mysql/src/Lowering/Utility/Set/SetRule.php:96
- method-call SqlSemantics\Platform\MySql\Lowering\Utility\Set\SetRule::continued() packages/sql-semantics-mysql/src/Lowering/Utility/Set/SetRule.php:160
Calls 3
- method-call Lowering::form() line 176
- class-const SetRule::SCOPES() line 178
- static-call ImplementationGap::production() line 178
public function characteristics(Node $characteristics): list<IsolationLevel|AccessMode>Lowers the characteristics of SET TRANSACTION in the order written: a node of transaction_characteristics.
Parameters
$characteristics | Node |
Returns
list<IsolationLevel|AccessMode>Throws
ImplementationGap When a production has no ruleCalled from 2
Calls 4
- method-call Lowering::form() line 189
- method-call SetRule::characteristic() line 192
- method-call SetRule::optional() line 194
- static-call ImplementationGap::production() line 195
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
$optional | Node |
Returns
list<IsolationLevel|AccessMode>Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 3
- method-call Lowering::form() line 207
- method-call SetRule::characteristic() line 211
- static-call ImplementationGap::production() line 212
public function characteristic(Node $characteristic): IsolationLevel|AccessModeLowers one characteristic: a node of isolation_level or transaction_access_mode.
Parameters
$characteristic | Node |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 4
- method-call SqlSemantics\Platform\MySql\Lowering\Utility\Set\SetRule::characteristics() packages/sql-semantics-mysql/src/Lowering/Utility/Set/SetRule.php:192
- method-call SqlSemantics\Platform\MySql\Lowering\Utility\Set\SetRule::characteristics() packages/sql-semantics-mysql/src/Lowering/Utility/Set/SetRule.php:193
- method-call SqlSemantics\Platform\MySql\Lowering\Utility\Set\SetRule::characteristics() packages/sql-semantics-mysql/src/Lowering/Utility/Set/SetRule.php:194
- method-call SqlSemantics\Platform\MySql\Lowering\Utility\Set\SetRule::optional() packages/sql-semantics-mysql/src/Lowering/Utility/Set/SetRule.php:211
Calls 5
- method-call Lowering::form() line 223
- class-const SetRule::LEVELS() line 227
- static-call ImplementationGap::production() line 227
- class-const AccessMode::ReadOnly() line 235
- class-const AccessMode::ReadWrite() line 236
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 $loweringTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
SetRuleTestcalls