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

RESET PERSIST [[IF EXISTS] [component.]variable]: removes persisted global system variable settings (MySQL 8.0 and later).

Mirrors SQLCOM_RESET with REFRESH_PERSIST: without a variable every persisted setting is removed. A component variable is written component.variable; the server joins the two names with a dot, and DEFAULT.variable names the component default. IF EXISTS turns the error for a variable that is not persisted into a warning. Rule: MYSQL-RESET-PERSIST-001. The statement has no facts of its own. Source: https://dev.mysql.com/doc/refman/8.4/en/reset-persist.html. Status: Implemented.

Removing one persisted settingdoctest
(new \SqlSemantics\Platform\MySql\Semantics())->analyze('reset persist if exists max_connections')->toString() // => 'RESET PERSIST IF EXISTS max_connections'

Properties§

public bool $ifExists = false
public Name|null $variable = null
public Name|null $component = null

Methods§

public function __construct(
    public bool $ifExists = false,
    public Name|null $variable = null,
    public Name|null $component = null,
)

Parameters

$ifExistsboolWhether IF EXISTS is written
$variableName|nullThe variable whose setting is removed; null for every setting
$componentName|nullThe component that defines the variable, when written
Calls 1
public function deriveStatement(Derivation $derivation): void

Checks that the release has persisted variables.

Parameters

$derivationDerivation
Calls 3
public function render(Output $out): void

Writes the request.

Parameters

$outOutput
Calls 4

Test cases 2§

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

Dedicated tests 2

Relations§

Instantiated in 4
Type checks 1
Type declarations 1