packages/sql-semantics-mysql/src/Statement/Dml/Load/FieldOptionKind.php

1<?php
2
3declare(strict_types=1);
4
5namespace SqlSemantics\Platform\MySql\Statement\Dml\Load;
6
7/**
8 * What a field option of a text file format sets: the field terminator, the enclosing character or the escape character.
9 *
10 * Each case holds the keywords it is written with before BY.
11 * Source: https://dev.mysql.com/doc/refman/8.4/en/load-data.html.
12 *
13 * @visibility public
14 * @example Reading the keywords of a case
15 *     \SqlSemantics\Platform\MySql\Statement\Dml\Load\FieldOptionKind::OptionallyEnclosed->value // => 'OPTIONALLY ENCLOSED'
16 */
17enum FieldOptionKind: string
18{
19    case Terminated = 'TERMINATED';
20    case OptionallyEnclosed = 'OPTIONALLY ENCLOSED';
21    case Enclosed = 'ENCLOSED';
22    case Escaped = 'ESCAPED';
23}
24