classItemRule
final class ItemRule
Lowers one item of a SET list.
Rule: MYSQL-SET-ITEM-LOWERING-001. Scope: option_value_no_option_type, option_value_following_option_type, internal_variable_name (5.6, 5.7), and the variable names of lvalue_variable (8.0 and later, also lowered by the leaf rules). Constructs: NameAssignment, SystemAssignment, UserAssignment, SetNames, SetCharacterSet, NamesExpression and, in MySQL 5.6, PasswordAssignment. The values are lowered by MYSQL-SET-VALUE-LOWERING-001. DEFAULT.x names the instance default (UtilityNoise). Terminates: every part 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-names.html, https://dev.mysql.com/doc/refman/8.4/en/set-character-set.html. Status: Implemented.
Methods§
public function __construct(private Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
public function password(Form $form): boolTells whether an item is a MySQL 5.6 password item.
Parameters
$form | Form |
Returns
boolCalled from 1
Calls 1
- class-const ItemRule::PASSWORDS() line 63
Lowers an item written without a leading scope keyword: a form of option_value_no_option_type.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 2
- method-call SqlSemantics\Platform\MySql\Lowering\Utility\Set\SetRule::unscoped() packages/sql-semantics-mysql/src/Lowering/Utility/Set/SetRule.php:115
- method-call SqlSemantics\Platform\MySql\Lowering\Utility\Set\SetRule::continued() packages/sql-semantics-mysql/src/Lowering/Utility/Set/SetRule.php:161
Calls 9
- new ValueRule line 73
- method-call ItemRule::named() line 77
- new UserAssignment line 79
- method-call Form::node() line 79
- method-call ItemRule::variable() line 82
- new SystemAssignment line 84
- new SystemVariable line 84
- method-call ValueRule::value() line 84
- method-call ItemRule::connection() line 90
Lowers an item that sets the connection character sets, or a MySQL 5.6 password item.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 8
- method-call Form::node() line 105
- new SetCharacterSet line 107
- new SetNames line 110
- new CharsetName line 112
- new NamesExpression line 116
- class-const ItemRule::PASSWORDS() line 118
- static-call ImplementationGap::production() line 118
- new PasswordAssignment line 121
public function scoped(VariableScope $scope, Form $form): NameAssignmentLowers an item written after a scope keyword: a form of option_value_following_option_type.
Parameters
$scope | VariableScope | |
$form | Form |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 2
Calls 2
- static-call ImplementationGap::production() line 133
- method-call ItemRule::named() line 136
public function named(?VariableScope $scope, Form $form): NameAssignmentLowers a name assignment whose name, equals sign and value are the first three children.
Parameters
$scope | ?VariableScope | |
$form | Form |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 2
- method-call SqlSemantics\Platform\MySql\Lowering\Utility\Set\ItemRule::unscoped() packages/sql-semantics-mysql/src/Lowering/Utility/Set/ItemRule.php:77
- method-call SqlSemantics\Platform\MySql\Lowering\Utility\Set\ItemRule::scoped() packages/sql-semantics-mysql/src/Lowering/Utility/Set/ItemRule.php:136
Calls 5
- method-call ItemRule::variable() line 146
- method-call Form::node() line 146
- new NameAssignment line 149
- method-call ValueRule::value() line 149
- new ValueRule line 149
Lowers a variable name and the qualifier written before it: a node of internal_variable_name or lvalue_variable.
Parameters
$variable | Node |
Throws
ImplementationGap When a production has no ruleCalled from 2
- method-call SqlSemantics\Platform\MySql\Lowering\Utility\Set\ItemRule::unscoped() packages/sql-semantics-mysql/src/Lowering/Utility/Set/ItemRule.php:82
- method-call SqlSemantics\Platform\MySql\Lowering\Utility\Set\ItemRule::named() packages/sql-semantics-mysql/src/Lowering/Utility/Set/ItemRule.php:146
Calls 3
- method-call Lowering::form() line 160
- new Name line 166
- static-call ImplementationGap::production() line 167
Private surface 2§
Implementation details, listed for orientation only.
private const PASSWORDS = ['option_value_no_option_type: PASSWORD equal text_or_password' => [null, 2], '…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
ItemRuleTestcalls
Relations§
Instantiated in 3
- new SqlSemantics\Platform\MySql\Lowering\Utility\Set\SetRule::unscoped() packages/sql-semantics-mysql/src/Lowering/Utility/Set/SetRule.php:108
- new SqlSemantics\Platform\MySql\Lowering\Utility\Set\SetRule::scoped() packages/sql-semantics-mysql/src/Lowering/Utility/Set/SetRule.php:127
- new SqlSemantics\Platform\MySql\Lowering\Utility\Set\SetRule::continued() packages/sql-semantics-mysql/src/Lowering/Utility/Set/SetRule.php:149
Method calls 5
- method-call SqlSemantics\Platform\MySql\Lowering\Utility\Set\SetRule::unscoped() packages/sql-semantics-mysql/src/Lowering/Utility/Set/SetRule.php:111
- method-call SqlSemantics\Platform\MySql\Lowering\Utility\Set\SetRule::unscoped() packages/sql-semantics-mysql/src/Lowering/Utility/Set/SetRule.php:115
- method-call SqlSemantics\Platform\MySql\Lowering\Utility\Set\SetRule::scoped() packages/sql-semantics-mysql/src/Lowering/Utility/Set/SetRule.php:127
- method-call SqlSemantics\Platform\MySql\Lowering\Utility\Set\SetRule::continued() packages/sql-semantics-mysql/src/Lowering/Utility/Set/SetRule.php:160
- method-call SqlSemantics\Platform\MySql\Lowering\Utility\Set\SetRule::continued() packages/sql-semantics-mysql/src/Lowering/Utility/Set/SetRule.php:161