classResetReplica
final class ResetReplica
implements ResetTarget
uses Snapshot
Public API: explicitly declared with
@visibility public.RESET REPLICA [ALL] [FOR CHANNEL 'name'], written RESET SLAVE in the legacy vocabulary.
Mirrors the REFRESH_REPLICA flag of SQLCOM_RESET with LEX::reset_replica_info. The vocabulary is the one of the release (MYSQL-REPLICATION-RELEASE-001): RESET SLAVE of 8.0 to 8.3 is read as its synonym RESET REPLICA. A channel needs MySQL 5.7 or later. Facts: a line feed in the channel name is a RefusedSetting diagnostic. Source: https://dev.mysql.com/doc/refman/8.4/en/reset-replica.html, https://dev.mysql.com/doc/refman/8.0/en/reset-slave.html.
(new \SqlSemantics\Platform\MySql\Semantics('mysql-8.0.44'))->analyze('reset slave all')->toString() // => 'RESET REPLICA ALL'Properties§
public Terminology $terminologypublic bool $all = falsepublic Text|null $channel = nullMethods§
public function __construct(
public Terminology $terminology,
public bool $all = false,
public Text|null $channel = null,
)Parameters
$terminology | Terminology | The vocabulary of the release |
$all | bool | Whether ALL is written: the connection settings are removed too |
$channel | Text|null | The replication channel, when FOR CHANNEL is written |
public function deriveTarget(Derivation $derivation): voidChecks the vocabulary and the channel against the release.
Parameters
$derivation | Derivation |
Calls 6
- static-call Check::input() line 51
- method-call Releases::source() line 51
- new Releases line 51
- class-const GrammarRelease::MySql5651() line 52
- method-call SourceSettings::lineFeed() line 53
- new SourceSettings line 53
public function render(Output $out): voidWrites the item.
Parameters
$out | Output |
Calls 2
- method-call Output::keyword() line 61
- class-const Terminology::Legacy() line 61
Test cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.