classSignalRule
final class SignalRule
Lowers SIGNAL and RESIGNAL.
Rule: MYSQL-SIGNAL-LOWERING-001. Scope: signal_stmt, resignal_stmt, signal_value, opt_signal_value, opt_set_signal_information, signal_information_item_list, signal_allowed_expr, signal_condition_information_item_name. The value of an item is a literal, a variable or a name, each lowered by its leaf rule. Constructs: Signal, Resignal, SignalItem. Terminates: the item list is walked with a loop. Source: https://dev.mysql.com/doc/refman/8.4/en/signal.html, https://dev.mysql.com/doc/refman/8.4/en/resignal.html. Status: Implemented.
Methods§
public function __construct(private Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
Lowers SIGNAL or RESIGNAL: the form of signal_stmt or resignal_stmt.
Parameters
$form | Form |
Throws
ImplementationGap When a production has no ruleTest cases 1
Called from 1
Calls 7
- new Signal line 70
- method-call SignalRule::condition() line 70
- method-call Form::node() line 70
- method-call SignalRule::items() line 70
- static-call ImplementationGap::production() line 73
- method-call Lowering::form() line 75
- new Resignal line 77
public function condition(Node $value): ConditionName|SqlStateLowers the condition of SIGNAL or RESIGNAL: a node of signal_value.
Parameters
$value | Node |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 2
- method-call SqlSemantics\Platform\MySql\Lowering\Routine\Condition\SignalRule::statement() packages/sql-semantics-mysql/src/Lowering/Routine/Condition/SignalRule.php:70
- method-call SqlSemantics\Platform\MySql\Lowering\Routine\Condition\SignalRule::statement() packages/sql-semantics-mysql/src/Lowering/Routine/Condition/SignalRule.php:79
Calls 5
- method-call Lowering::form() line 91
- new ConditionName line 93
- method-call ConditionRule::value() line 95
- new ConditionRule line 95
- static-call ImplementationGap::production() line 97
public function items(Node $clause): list<SignalItem>Lowers the SET clause: a node of opt_set_signal_information; an absent clause is empty.
Parameters
$clause | Node |
Returns
list<SignalItem>Throws
ImplementationGap When a production has no ruleCalled from 2
- method-call SqlSemantics\Platform\MySql\Lowering\Routine\Condition\SignalRule::statement() packages/sql-semantics-mysql/src/Lowering/Routine/Condition/SignalRule.php:70
- method-call SqlSemantics\Platform\MySql\Lowering\Routine\Condition\SignalRule::statement() packages/sql-semantics-mysql/src/Lowering/Routine/Condition/SignalRule.php:81
Calls 6
- method-call Lowering::form() line 108
- static-call ImplementationGap::production() line 113
- function-call
array_unshiftline 124 - new SignalItem line 124
- class-const SignalRule::ITEMS() line 124
- method-call SignalRule::operand() line 124
Lowers the value of an item or a condition number: a node of signal_allowed_expr.
Parameters
$expression | Node |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 2
- method-call SqlSemantics\Platform\MySql\Lowering\Routine\Condition\DiagnosticsRule::statement() packages/sql-semantics-mysql/src/Lowering/Routine/Condition/DiagnosticsRule.php:103
- method-call SqlSemantics\Platform\MySql\Lowering\Routine\Condition\SignalRule::items() packages/sql-semantics-mysql/src/Lowering/Routine/Condition/SignalRule.php:124
Calls 2
- method-call Lowering::form() line 139
- static-call ImplementationGap::production() line 145
Private surface 2§
Implementation details, listed for orientation only.
private const ITEMS = ['signal_condition_information_item_name: CLASS_ORIGIN_SYM' => \SqlSemantics\Pl…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
Relations§
Instantiated in 2
- new SqlSemantics\Platform\MySql\Lowering\Routine\Condition\DiagnosticsRule::statement() packages/sql-semantics-mysql/src/Lowering/Routine/Condition/DiagnosticsRule.php:103
- new SqlSemantics\Platform\MySql\Lowering\Routine\RoutineRules::statement() packages/sql-semantics-mysql/src/Lowering/Routine/RoutineRules.php:48
Method calls 2
- method-call SqlSemantics\Platform\MySql\Lowering\Routine\Condition\DiagnosticsRule::statement() packages/sql-semantics-mysql/src/Lowering/Routine/Condition/DiagnosticsRule.php:103
- method-call SqlSemantics\Platform\MySql\Lowering\Routine\RoutineRules::statement() packages/sql-semantics-mysql/src/Lowering/Routine/RoutineRules.php:48