final class SqlState
    implements Condition
    uses Snapshot
Public API: explicitly declared with @visibility public.

An SQLSTATE value: SQLSTATE [VALUE] 'xxxxx'.

The optional word VALUE carries no meaning and is not kept. A value that is not five digits or upper-case letters, or that begins with 00, is still structured; the statement that holds it reports it. Source: https://dev.mysql.com/doc/refman/8.4/en/declare-condition.html.

Checking the form of an SQLSTATE valuedoctest
$text = new \SqlSemantics\Platform\MySql\Statement\Literal\Text('00000');
    (new \SqlSemantics\Platform\MySql\Statement\Routine\Condition\SqlState($text))->valid() // => false

Properties§

public Text $state

Methods§

public function __construct(public Text $state)

Parameters

$stateTextThe five characters of the value, written as a quoted string
Calls 1
public function valid(): bool

Tells whether the value has the form of an SQLSTATE that is not a success class.

Returns

bool
Test cases 1
Calls 2
public function render(Output $out): void

Writes SQLSTATE and the value.

Parameters

$outOutput
Test cases 1
Calls 1

Test cases 17§

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

Dedicated tests 5
Other tests reaching this symbol 12

Relations§

Instantiated in 1
Type checks 3
Type declarations 6