final class GetDiagnostics
    implements Statement, ProgramStatement
    uses Snapshot
Public API: explicitly declared with @visibility public.

GET DIAGNOSTICS: copies statement or condition information of a diagnostics area into variables.

The statement is valid on its own and inside a stored program; it returns no rows. The facts follow MYSQL-PROGRAM-CONDITIONS-001. Source: https://dev.mysql.com/doc/refman/8.4/en/get-diagnostics.html.

Reading the area and the kind of informationdoctest
$get = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('GET STACKED DIAGNOSTICS CONDITION 1 @m = MESSAGE_TEXT');
    [$get->statement->area->value, $get->toString()] // => ['STACKED', 'GET STACKED DIAGNOSTICS CONDITION 1 @m = MESSAGE_TEXT']

Properties§

public DiagnosticsArea|null $area = null

Methods§

public function __construct(
    public ConditionDiagnostics|StatementDiagnostics $information,
    public DiagnosticsArea|null $area = null,
)

Parameters

$informationConditionDiagnostics|StatementDiagnosticsThe information read
$areaDiagnosticsArea|nullThe area keyword, when written
public function deriveStatement(Derivation $derivation): void

Derives the statement outside a stored program, where no local variable is in scope.

Parameters

$derivationDerivation
Calls 3
public function deriveProgram(Derivation $derivation, ProgramScope $scope): void
public function render(Output $out): void

Writes the statement.

Parameters

$outOutput
Calls 1

Test cases 14§

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 10

Relations§

Instantiated in 2
Type declarations 1