final class InformationItem
    implements Node
    uses Snapshot
Public API: explicitly declared with @visibility public.

One assignment of GET DIAGNOSTICS: a target and the information item it receives.

The target is a user variable, or the name of a parameter or local variable of the stored program that holds the statement. Source: https://dev.mysql.com/doc/refman/8.4/en/get-diagnostics.html.

Reading the items of GET DIAGNOSTICSdoctest
$get = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('GET DIAGNOSTICS @n = NUMBER, @r = ROW_COUNT');
    [$get->statement->information->items[1]->target->name->value, $get->statement->information->items[1]->item->value] // => ['r', 'ROW_COUNT']

Properties§

public Name|UserVariable $target

Methods§

public function __construct(
    public Name|UserVariable $target,
    public ConditionItemName|StatementItemName $item,
)

Parameters

$targetName|UserVariableThe variable that receives the item: a user variable or the name of a parameter or local variable
$itemConditionItemName|StatementItemNameThe information item read
public function render(Output $out): void

Writes the target, the equals sign and the item.

Parameters

$outOutput
Test cases 2
Calls 4

Test cases 12§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 2
Other tests reaching this symbol 10

Relations§

Instantiated in 1
Constant reads 2