classStorageOptionRule
final class StorageOptionRule
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
$lowering | Lowering | The lowering this rule belongs to |
public function options(Node $list): list<StorageOption>Lowers an option list, in written order.
Parameters
$list | Node |
Returns
list<StorageOption>Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 9
- function-call
array_popline 172 - method-call Lowering::form() line 173
- class-const StorageOptionRule::EMPTY() line 174
- class-const StorageOptionRule::SLOTS() line 177
- method-call StorageOptionRule::option() line 178
- function-call
in_arrayline 181 - class-const StorageOptionRule::LISTS() line 181
- static-call ImplementationGap::production() line 182
- function-call
countline 184
public function option(Node $option): StorageOptionLowers one option: a node of an opt_ts_* or ts_option_* rule, or of ts_wait.
Parameters
$option | Node |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 12
- method-call Lowering::form() line 204
- class-const StorageOptionRule::SIZES() line 205
- new SizeOption line 211
- class-const StorageOptionRule::OTHERS() line 213
- static-call ImplementationGap::production() line 213
- new NodegroupOption line 216
- method-call StorageOptionRule::value() line 216
- new CommentOption line 217
- method-call StorageOptionRule::engine() line 218
- new WaitOption line 219
- new EncryptionOption line 221
- new EngineAttributeOption line 222
Answers the node of an option value after its optional equals sign.
Parameters
$form | Form | |
$position | int |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 5
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\StorageOptionRule::option() packages/sql-semantics-mysql/src/Lowering/Server/Storage/StorageOptionRule.php:216
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\StorageOptionRule::option() packages/sql-semantics-mysql/src/Lowering/Server/Storage/StorageOptionRule.php:217
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\StorageOptionRule::option() packages/sql-semantics-mysql/src/Lowering/Server/Storage/StorageOptionRule.php:221
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\StorageOptionRule::option() packages/sql-semantics-mysql/src/Lowering/Server/Storage/StorageOptionRule.php:222
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\StorageOptionRule::engine() packages/sql-semantics-mysql/src/Lowering/Server/Storage/StorageOptionRule.php:247
Calls 1
- method-call Form::node() line 233
public function engine(Form $form): EngineOptionLowers [STORAGE] ENGINE [=] name.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 3
- method-call Form::node() line 245
- new EngineOption line 247
- method-call StorageOptionRule::value() line 247
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 $loweringTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
StorageOptionRuleTestcalls