classPurgeLogsTo
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.
(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 $fileMethods§
public function __construct(public Text $file)Parameters
$file | Text | The name of the first binary log file kept |
public function deriveStatement(Derivation $derivation): voidRecords nothing: the statement names a file, not a declaration.
Parameters
$derivation | Derivation |
public function render(Output $out): voidTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
PurgeLogsToTestcalls