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

One assignment of INSTALL COMPONENT … SET: [GLOBAL | PERSIST] [component.]variable = value.

Mirrors PT_install_component_set_element. The scope is the variable's scope: GLOBAL, PERSIST, or none, which the server takes as GLOBAL. The variable is written without at signs. The value is an expression or the word ON. Source: https://dev.mysql.com/doc/refman/8.4/en/install-component.html.

Persisting a component variabledoctest
$install = (new \SqlSemantics\Platform\MySql\Semantics())->analyze("INSTALL COMPONENT 'file://c' SET PERSIST c.v = 4");
    [$install->statement->settings[0]->variable->scope, $install->statement->settings[0]->variable->instance?->value] // => [\SqlSemantics\Platform\MySql\Statement\Variable\VariableScope::Persist, 'c']

Properties§

public SystemVariable $variable
public Scalar $value

Methods§

public function __construct(public SystemVariable $variable, public Scalar $value)

Parameters

$variableSystemVariableThe variable with its scope and component
$valueScalarThe value: an expression, or OnWord

Throws

InvalidConstruction When the scope is neither absent, GLOBAL nor PERSIST
Calls 4
public function render(Output $out): void

Writes the assignment.

Parameters

$outOutput
Calls 3

Test cases 1§

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

Dedicated tests 1

Relations§

Instantiated in 1
Constant reads 1
Type declarations 1