classConditionDiagnostics
final class ConditionDiagnostics
implements Node
uses Snapshot
Public API: explicitly declared with
@visibility public.The information about one condition GET DIAGNOSTICS reads: CONDITION number item, ....
Source: https://dev.mysql.com/doc/refman/8.4/en/get-diagnostics.html.
$get = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('GET DIAGNOSTICS CONDITION 2 @m = MESSAGE_TEXT');
[$get->statement->information->number->text, count($get->statement->information->items)] // => ['2', 1]Properties§
public non-empty-list<InformationItem> $itemspublic Scalar $numberMethods§
public function __construct(public Scalar $number, list<InformationItem> $items)Parameters
$number | Scalar | The number of the condition, counted from 1: a literal, a variable or a name |
$items | list<InformationItem> | The assignments; at least one, each of a condition information item |
Calls 3
- static-call Check::listOf() line 39
- class-const InformationItem::class() line 39
- static-call Check::input() line 41
public function render(Output $out): voidWrites CONDITION, the number and the assignments.
Parameters
$out | Output |
Test cases 1
Calls 1
- method-call Output::keyword() line 50
Test cases 9§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 4
Other tests reaching this symbol 5
DiagnosticsRuleTest::testItemsLowersLocalVariableTargetscallsDiagnosticsRuleTest::testStatementLowersConditionInformationcallsDiagnosticsRuleTest::testStatementLowersTheConditionNumberAsAVariablecallsGetDiagnosticsTest::testDeriveProgramResolvesParametersAndLocalVariablescallsGetDiagnosticsTest::testDeriveStatementReadsConditionInformationOfAVariableNumbercalls