final class FieldOption
    implements Node
    uses Snapshot
Public API: explicitly declared with @visibility public.

One option of the FIELDS clause of a text file format: TERMINATED BY, [OPTIONALLY] ENCLOSED BY or ESCAPED BY a string.

Source: https://dev.mysql.com/doc/refman/8.4/en/load-data.html.

Reading the field terminator of INTO OUTFILEdoctest
$query = (new \SqlSemantics\Platform\MySql\Semantics())->analyze("SELECT 1 INTO OUTFILE 'f' FIELDS TERMINATED BY ','");
    [$query->statement->into->format->fields[0]->kind, $query->statement->into->format->fields[0]->text->value] // => [\SqlSemantics\Platform\MySql\Statement\Dml\Load\FieldOptionKind::Terminated, ',']

Properties§

public Text $text

Methods§

public function __construct(public FieldOptionKind $kind, public Text $text)

Parameters

$kindFieldOptionKindWhat the option sets
$textTextThe string it sets
public function render(Output $out): void

Writes the option.

Parameters

$outOutput
Test cases 1
Calls 2

Test cases 1§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1

Relations§

Instantiated in 1
Constant reads 2