classSignalItem
final class SignalItem
implements Node
uses Snapshot
Public API: explicitly declared with
@visibility public.One assignment of the SET clause of SIGNAL or RESIGNAL: a condition information item and its value.
The grammar accepts a literal, a variable or a name as the value. Source: https://dev.mysql.com/doc/refman/8.4/en/signal.html#signal-condition-information-items.
$signal = (new \SqlSemantics\Platform\MySql\Semantics())->analyze("SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'no', MYSQL_ERRNO = 1001");
$signal->statement->items[1]->name // => \SqlSemantics\Platform\MySql\Statement\Routine\Condition\ConditionItemName::MysqlErrnoProperties§
public ConditionItemName $namepublic Scalar $valueMethods§
public function __construct(public ConditionItemName $name, public Scalar $value)Parameters
$name | ConditionItemName | The item that is set; not RETURNED_SQLSTATE |
$value | Scalar | The value |
Calls 2
- static-call Check::input() line 33
- class-const ConditionItemName::ReturnedSqlstate() line 33
public function render(Output $out): voidWrites the item, the equals sign and the value.
Parameters
$out | Output |
Test cases 1
Calls 1
- method-call Output::keyword() line 41
Test cases 9§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 3
Other tests reaching this symbol 6
SignalRuleTest::providerStatementLowersResignalcallsSignalRuleTest::testItemsLowersEveryItemNameInOrdercallsSignalRuleTest::testOperandLowersLiteralsVariablesAndNamescallsConditionTest::testImplementationsAreTheValuesAHandlerNamescallsResignalTest::testDeriveStatementAcceptsAnSqlStateValueAndItsItemscallsSignalTest::testDeriveStatementAcceptsAnSqlStateValueAndItsItemscalls
Relations§
Instantiated in 1
Constant reads 2
- class-const SqlSemantics\Platform\MySql\Statement\Routine\Condition\Resignal::__construct() packages/sql-semantics-mysql/src/Statement/Routine/Condition/Resignal.php:44
- class-const SqlSemantics\Platform\MySql\Statement\Routine\Condition\Signal::__construct() packages/sql-semantics-mysql/src/Statement/Routine/Condition/Signal.php:44