packages/sql-semantics-mysql/src/Statement/Routine/Event/EventStatus.php
1<?php
2
3declare(strict_types=1);
4
5namespace SqlSemantics\Platform\MySql\Statement\Routine\Event;
6
7/**
8 * Whether an event is active: ENABLE, DISABLE, or disabled on replicas.
9 *
10 * DISABLE ON SLAVE and DISABLE ON REPLICA mean the same; they are separate
11 * cases because the releases accept different spellings (the grammar reads
12 * SLAVE in every release and REPLICA from MySQL 8.2), so the written keyword
13 * is kept.
14 * Source: https://dev.mysql.com/doc/refman/8.4/en/create-event.html.
15 *
16 * @visibility public
17 * @example Listing the cases
18 * count(\SqlSemantics\Platform\MySql\Statement\Routine\Event\EventStatus::cases()) // => 4
19 */
20enum EventStatus
21{
22 case Enable;
23 case Disable;
24 case DisableOnSlave;
25 case DisableOnReplica;
26}
27