classShowRelaylogEvents
final class ShowRelaylogEvents
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.SHOW RELAYLOG EVENTS: the events of a relay log file of a replica.
Rule: MYSQL-SHOW-RELAYLOG-EVENTS-001. IN names the file, FROM the position of the first event, FOR CHANNEL (5.7 and later) the replication channel. LIMIT selects rows as in SELECT; its operands are derived at a position that sees no relation. The columns are those of SHOW BINLOG EVENTS in the layout of MYSQL-SHOW-ROWS-001. Terminates: a fixed layout. Source: https://dev.mysql.com/doc/refman/8.4/en/show-relaylog-events.html. Status: Implemented.
$show = (new \SqlSemantics\Platform\MySql\Semantics())->analyze("SHOW RELAYLOG EVENTS LIMIT 1 FOR CHANNEL 'c'");
[$show->statement->channel?->value, $show->toString()] // => ['c', "SHOW RELAYLOG EVENTS LIMIT 1 FOR CHANNEL 'c'"]Properties§
public ?Text $file = nullpublic ?Numeral $position = nullpublic ?Limit $limit = nullpublic ?Text $channel = nullMethods§
public function deriveStatement(Derivation $derivation): voidDerives the rows.
Parameters
$derivation | Derivation |
Calls 4
- new ShowFacts line 52
- method-call ShowFacts::limit() line 53
- method-call ShowFacts::rows() line 54
- class-const Report::LogEvents() line 54
public function render(Output $out): voidWrites the statement.
Parameters
$out | Output |
Calls 2
- method-call Output::keyword() line 62
- method-call Output::node() line 69
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 2
- new SqlSemantics\Platform\MySql\Lowering\Utility\Show\LegacyShowRule::session() packages/sql-semantics-mysql/src/Lowering/Utility/Show/LegacyShowRule.php:103
- new SqlSemantics\Platform\MySql\Lowering\Utility\Show\ShowRule::replication() packages/sql-semantics-mysql/src/Lowering/Utility/Show/ShowRule.php:100