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

PURGE BINARY LOGS TO 'file': deletes the binary log files listed before the named one.

Mirrors SQLCOM_PURGE with LEX::to_log. MASTER LOGS is a synonym of BINARY LOGS up to 8.3 and is written BINARY LOGS. Rule: MYSQL-PURGE-001. The statement has no facts of its own. Source: https://dev.mysql.com/doc/refman/8.4/en/purge-binary-logs.html, https://dev.mysql.com/doc/refman/5.7/en/purge-binary-logs.html. Status: Implemented.

Writing MASTER LOGS as its synonymdoctest
(new \SqlSemantics\Platform\MySql\Semantics('mysql-5.7.44'))->analyze("purge master logs to 'binlog.000010'")->toString() // => "PURGE BINARY LOGS TO 'binlog.000010'"

Properties§

public Text $file

Methods§

public function __construct(public Text $file)

Parameters

$fileTextThe name of the first binary log file kept
public function deriveStatement(Derivation $derivation): void

Records nothing: the statement names a file, not a declaration.

Parameters

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

Writes the request.

Parameters

$outOutput
Calls 1

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