final class FormatRule
Restricted visibility: declared "@visibility SqlSemantics\Platform\MySql\Lowering\Dml". Code outside that scope must not name this declaration.

Lowers the text file format of LOAD DATA and SELECT ... INTO OUTFILE.

Rule: MYSQL-DML-FORMAT-001. Scope: opt_load_data_charset, opt_field_term, field_term_list, field_term, opt_line_term, line_term_list, line_term. The options are kept in written order (FieldOption, LineOption); the keyword FIELDS is the lexer's COLUMNS. Terminates: lists are flattened by MYSQL-DML-LIST-001. Source: https://dev.mysql.com/doc/refman/8.4/en/load-data.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function charset(Node $charset): ?CharsetName

Lowers the character set clause: a node of opt_load_data_charset; an absent clause is null.

Parameters

$charsetNode

Returns

Throws

ImplementationGap When a production has no rule
Called from 2
Calls 2
public function fields(Node $clause): list<FieldOption>

Private surface 3§

Implementation details, listed for orientation only.

private const FIELDS = ['field_term: TERMINATED BY text_string' => \SqlSemantics\Platform\MySql\Statem…
private const LINES = ['line_term: TERMINATED BY text_string' => \SqlSemantics\Platform\MySql\Stateme…
private Lowering $lowering

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 2
Method calls 6