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

FLUSH [NO_WRITE_TO_BINLOG | LOCAL] item, …: a request to clear or reload server caches and logs.

Mirrors SQLCOM_FLUSH with the REFRESH_* flags of LEX::type. Rule: MYSQL-FLUSH-001. The items are kept in written order; the server merges them into flags. LOCAL is a synonym of NO_WRITE_TO_BINLOG, which is written. The statement names no relation and has no facts. Source: https://dev.mysql.com/doc/refman/8.4/en/flush.html. Status: Implemented.

Flushing logs and privilegesdoctest
$flush = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('flush local binary logs, privileges');
    [$flush->toString(), $flush->statement->items[1]->option] // => ['FLUSH NO_WRITE_TO_BINLOG BINARY LOGS, PRIVILEGES', \SqlSemantics\Platform\MySql\Statement\Server\Flush\FlushOption::Privileges]

Properties§

public list<FlushItem> $items
public bool $noWriteToBinlog

Methods§

public function __construct(public bool $noWriteToBinlog, list<FlushItem> $items)

Parameters

$noWriteToBinlogboolWhether NO_WRITE_TO_BINLOG or its synonym LOCAL is written
$itemslist<FlushItem>The items in written order; at least one

Throws

InvalidConstruction When the list is empty
Calls 2
public function deriveStatement(Derivation $derivation): void

Has nothing to derive: the request names no relation and no value.

Parameters

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

Writes the request.

Parameters

$outOutput
Calls 2

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
Type checks 1