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.

Reading the condition numberdoctest
$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> $items
public Scalar $number

Methods§

public function __construct(public Scalar $number, list<InformationItem> $items)

Parameters

$numberScalarThe number of the condition, counted from 1: a literal, a variable or a name
$itemslist<InformationItem>The assignments; at least one, each of a condition information item
Calls 3
public function render(Output $out): void

Writes CONDITION, the number and the assignments.

Parameters

$outOutput
Test cases 1
Calls 1

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

Relations§

Instantiated in 1
Type checks 1
Type declarations 1