packages/sql-semantics-mysql/src/Statement/Replication/Replica/ReplicaThread.php
1<?php
2
3declare(strict_types=1);
4
5namespace SqlSemantics\Platform\MySql\Statement\Replication\Replica;
6
7/**
8 * The replication threads START and STOP REPLICA can name: the server's REPLICA_SQL and REPLICA_IO flags.
9 *
10 * Each case holds the keyword it is written with; the lexer reads
11 * RELAY_THREAD as a synonym of IO_THREAD.
12 * Source: https://dev.mysql.com/doc/refman/8.4/en/start-replica.html.
13 *
14 * @visibility public
15 * @example Reading the keyword of a thread
16 * \SqlSemantics\Platform\MySql\Statement\Replication\Replica\ReplicaThread::Receiver->value // => 'IO_THREAD'
17 */
18enum ReplicaThread: string
19{
20 case Applier = 'SQL_THREAD';
21 case Receiver = 'IO_THREAD';
22}
23