classShowReplicas
final class ShowReplicas
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.SHOW REPLICAS (SHOW SLAVE HOSTS): the replicas registered with the source.
Rule: MYSQL-SHOW-REPLICAS-001. The two spellings are kept: they name the columns differently (Master_id, Slave_UUID against Source_Id, Replica_UUID), and each release accepts only some of them (SHOW SLAVE HOSTS up to 8.3, SHOW REPLICAS from 8.0). The columns are those of the layout of MYSQL-SHOW-ROWS-001 for the spelling. Terminates: a fixed layout. Source: https://dev.mysql.com/doc/refman/8.4/en/show-replicas.html. Status: Implemented.
$show = (new \SqlSemantics\Platform\MySql\Semantics('mysql-8.0.44'))->analyze('SHOW SLAVE HOSTS');
[$show->field(4)->name?->value, $show->toString()] // => ['Slave_UUID', 'SHOW SLAVE HOSTS']Properties§
public Terminology $terminologyMethods§
public function __construct(public Terminology $terminology)Parameters
$terminology | Terminology | Whether SLAVE HOSTS or REPLICAS is written |
public function deriveStatement(Derivation $derivation): voidDerives the rows.
Parameters
$derivation | Derivation |
Calls 5
- method-call ShowFacts::rows() line 47
- new ShowFacts line 47
- class-const Terminology::Legacy() line 47
- class-const Report::ReplicaHosts() line 47
- class-const Report::Replicas() line 47
public function render(Output $out): voidWrites the statement.
Parameters
$out | Output |
Calls 3
- class-const Terminology::Legacy() line 56
- method-call Output::keyword() line 56
- class-const Terminology::Current() line 57
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 3
- new SqlSemantics\Platform\MySql\Lowering\Utility\Show\LegacyShowRule::session() packages/sql-semantics-mysql/src/Lowering/Utility/Show/LegacyShowRule.php:101
- new SqlSemantics\Platform\MySql\Lowering\Utility\Show\ShowRule::replication() packages/sql-semantics-mysql/src/Lowering/Utility/Show/ShowRule.php:94
- new SqlSemantics\Platform\MySql\Lowering\Utility\Show\ShowRule::replication() packages/sql-semantics-mysql/src/Lowering/Utility/Show/ShowRule.php:96