classDmlNoise
final class DmlNoise
Restricted visibility: declared "@visibility SqlSemantics\Platform\MySql". Code outside that scope must not name this declaration.
The noise and synonym token positions of the productions of data manipulation statements.
Only a token with no influence on meaning in its production may be listed as noise, and only terminals the manual defines as synonyms may share a key. Every entry is listed in the method documentation with its reason and the manual page that states it. Nothing else is skipped or merged by the token correspondence check.
Methods§
public static function positions(): array<string, list<int>>Answers the noise positions by production signature.
opt_INTO: INTOandinsert2: INTO insert_table, position 0: INTO is optional (https://dev.mysql.com/doc/refman/8.4/en/insert.html: "INSERT ... [INTO] tbl_name"; https://dev.mysql.com/doc/refman/8.4/en/replace.html).opt_from_keyword: FROM:LOAD DATA [FROM] [LOCAL] INFILE, the word is optional (https://dev.mysql.com/doc/refman/8.4/en/load-data.html; the grammar action of sql/sql_yacc.yy 8.4 stores nothing).opt_field_or_var_spec: ( ): an empty column list of LOAD DATA is no list; the grammar action yields the same null value as an absent list, and the server then loads every column (https://dev.mysql.com/doc/refman/8.4/en/load-data.html, sql/sql_yacc.yy 8.4).opt_sp_cparam_list: ( opt_sp_cparams )andopt_paren_expr_list: ( opt_expr_list ), positions 0 and 2: the parentheses of CALL; without arguments they may be omitted (https://dev.mysql.com/doc/refman/8.4/en/call.html: "CALL p() and CALL p are equivalent"). The writer adds them exactly when there are arguments.
Returns
array<string, list<int>>Test cases 2
public static function synonyms(): array<string, array<int, string>>Answers the key of each synonym position by production signature.
insert_values: VALUE_SYM values_listandvalue_or_values: VALUE_SYM: VALUE is a synonym for VALUES (https://dev.mysql.com/doc/refman/8.4/en/insert.html: "VALUE is a synonym for VALUES in this context").deallocate_or_drop: DROP:{DEALLOCATE | DROP} PREPARE stmt_name(https://dev.mysql.com/doc/refman/8.4/en/deallocate-prepare.html).lines_or_rows: ROWS_SYM:IGNORE number {LINES | ROWS}skips that many lines or rows at the start of the file; both set the same count (https://dev.mysql.com/doc/refman/8.4/en/load-data.html, https://dev.mysql.com/doc/refman/8.4/en/load-xml.html).
Returns
array<string, array<int, string>>Test cases 2
Test cases 4§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.