final class ProgramVariable
    implements MissingInput
    uses Snapshot
Public API: explicitly declared with @visibility public.

The declarations of the stored program a SET runs in, which decide whether a name is one of its variables.

Inside a stored program, SET x = v assigns the declared variable x when the program declares one and the system variable x otherwise; the value v of a system variable that is a bare name is its text, while for a program variable it is an expression. A version 1 context holds no program declarations. Source: https://dev.mysql.com/doc/refman/8.4/en/set-variable.html, https://dev.mysql.com/doc/refman/8.4/en/local-variable-scope.html.

Describing the missing declarationsdoctest
(new \SqlSemantics\Platform\MySql\Statement\Utility\Problem\ProgramVariable(new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('x')))->describe() // => 'the variable declarations of the enclosing stored program, which decide what x denotes'

Properties§

public Name $name

Methods§

public function __construct(public Name $name)

Parameters

$nameNameThe name whose meaning the declarations decide
public function describe(): string

Describes the missing declarations.

Returns

string
Test cases 1

Test cases 2§

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

Dedicated tests 1
Other tests reaching this symbol 1

Relations§

Instantiated in 1