classResignal
final class Resignal
implements Statement, ProgramStatement
uses Snapshot
Public API: explicitly declared with
@visibility public.RESIGNAL: passes on, or changes and passes on, the condition a handler is handling.
The statement is valid on its own and inside a stored program, where a condition name and the names in the item values are resolved in the scope of the statement. The facts follow MYSQL-PROGRAM-CONDITIONS-001. Source: https://dev.mysql.com/doc/refman/8.4/en/resignal.html.
$signal = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('RESIGNAL SET MYSQL_ERRNO = 5');
[$signal->statement->condition, $signal->toString()] // => [null, 'RESIGNAL SET MYSQL_ERRNO = 5']Properties§
public list<SignalItem> $itemspublic ConditionName|SqlState|null $conditionMethods§
public function __construct(
public ConditionName|SqlState|null $condition,
list<SignalItem> $items = [],
)Parameters
$condition | ConditionName|SqlState|null | The condition passed on instead of the handled one, when written |
$items | list<SignalItem> | The condition information items of the SET clause; empty without SET |
Calls 2
- static-call Check::listOf() line 44
- class-const SignalItem::class() line 44
public function deriveStatement(Derivation $derivation): voidDerives the statement outside a stored program, where no condition name and no local variable is in scope.
Parameters
$derivation | Derivation |
Calls 3
- method-call Resignal::deriveProgram() line 52
- new ProgramScope line 52
- method-call Derivation::environment() line 52
public function deriveProgram(Derivation $derivation, ProgramScope $scope): voidDerives the condition and the items in the scope of the statement.
Parameters
$derivation | Derivation | |
$scope | ProgramScope |
Called from 1
Calls 2
- method-call ConditionFacts::signal() line 60
- new ConditionFacts line 60
public function render(Output $out): voidTest cases 8§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.