packages/sql-semantics-mysql/src/Statement/Table/Column/Kind/GeneratedStorage.php
1<?php
2
3declare(strict_types=1);
4
5namespace SqlSemantics\Platform\MySql\Statement\Table\Column\Kind;
6
7/**
8 * How a generated column keeps its values: VIRTUAL computes them when rows are read, STORED when rows are written.
9 *
10 * Each case holds the keywords it is written with.
11 * Source: https://dev.mysql.com/doc/refman/8.4/en/create-table-generated-columns.html.
12 *
13 * @visibility public
14 * @example Reading the keywords of a case
15 * \SqlSemantics\Platform\MySql\Statement\Table\Column\Kind\GeneratedStorage::Stored->value // => 'STORED'
16 */
17enum GeneratedStorage: string
18{
19 case Virtual = 'VIRTUAL';
20 case Stored = 'STORED';
21}
22