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

Lowers the option lists of tablespace, undo tablespace and log file group statements.

Rule: MYSQL-STORAGE-OPTION-001. Scope (5.6, 5.7): tablespace_option_list, tablespace_options, tablespace_option, alter_tablespace_option_list, alter_tablespace_options, alter_tablespace_option, logfile_group_option_list, logfile_group_options, logfile_group_option, alter_logfile_group_option_list, alter_logfile_group_options, alter_logfile_group_option, change_ts_option_list, change_ts_options, change_ts_option, drop_ts_options_list, drop_ts_options, drop_ts_option, opt_ts_initial_size, opt_ts_autoextend_size, opt_ts_max_size, opt_ts_extent_size, opt_ts_undo_buffer_size, opt_ts_redo_buffer_size, opt_ts_nodegroup, opt_ts_comment, opt_ts_engine, opt_ts_file_block_size, ts_wait; (8.0 and later) opt_tablespace_options, opt_alter_tablespace_options, opt_undo_tablespace_options, undo_tablespace_option_list, undo_tablespace_option, opt_logfile_group_options, opt_alter_logfile_group_options, opt_drop_ts_options, drop_ts_option_list and the ts_option_* rules. The list rules (empty, wrapping, left recursive with or without a comma) are walked with an explicit stack; the commas are optional (ServerNoise, LeafNoise opt_comma), as are STORAGE and the equals signs (LeafNoise). Constructs: SizeOption, NodegroupOption, CommentOption, EngineOption, WaitOption, EncryptionOption, EngineAttributeOption. Terminates: every node is visited once. Source: https://dev.mysql.com/doc/refman/8.4/en/create-tablespace.html, https://dev.mysql.com/doc/refman/8.4/en/create-logfile-group.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function options(Node $list): list<StorageOption>

Lowers an option list, in written order.

Parameters

$listNode

Returns

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 9

Private surface 6§

Implementation details, listed for orientation only.

private const EMPTY = ['tablespace_option_list:' => true, 'alter_tablespace_option_list:' => true, 'l…
private const LISTS = ['tablespace_option_list: tablespace_options', 'alter_tablespace_option_list: a…
private const SLOTS = ['change_ts_option: opt_ts_initial_size' => true, 'change_ts_option: opt_ts_aut…
private const SIZES = ['opt_ts_initial_size: INITIAL_SIZE_SYM opt_equal size_number' => [\SqlSemantic…
private const OTHERS = ['opt_ts_nodegroup: NODEGROUP_SYM opt_equal real_ulong_num' => 'nodegroup', 'ts…
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 1
Method calls 1