packages/sql-semantics-mysql/src/Statement/Server/Storage/Option/TablespaceAccess.php

1<?php
2
3declare(strict_types=1);
4
5namespace SqlSemantics\Platform\MySql\Statement\Server\Storage\Option;
6
7/**
8 * The access mode ALTER TABLESPACE sets in MySQL 5.x: READ_ONLY, READ_WRITE or NOT ACCESSIBLE.
9 *
10 * Mirrors ts_access_mode. Each case holds the keywords it is written with.
11 * Source: https://dev.mysql.com/doc/refman/5.7/en/alter-tablespace.html.
12 *
13 * @visibility public
14 * @example Reading the keywords of a case
15 *     \SqlSemantics\Platform\MySql\Statement\Server\Storage\Option\TablespaceAccess::NotAccessible->value // => 'NOT ACCESSIBLE'
16 */
17enum TablespaceAccess: string
18{
19    case ReadOnly = 'READ_ONLY';
20    case ReadWrite = 'READ_WRITE';
21    case NotAccessible = 'NOT ACCESSIBLE';
22}
23