classTablespaceRule
final class TablespaceRule
Lowers the tablespace and undo tablespace statements.
Rule: MYSQL-TABLESPACE-001. Scope: the TABLESPACE alternatives of create, alter and drop, tablespace_info, alter_tablespace_info, change_tablespace_info, change_tablespace_access, tablespace_name, ts_access_mode (5.6, 5.7), the TABLESPACE and UNDO TABLESPACE alternatives of create, alter_tablespace_stmt, alter_undo_tablespace_stmt, drop_tablespace_stmt, drop_undo_tablespace_stmt, opt_ts_datafile_name, undo_tablespace_state (8.0 and later), ts_datafile, opt_logfile_group_name. The options go through MYSQL-STORAGE-OPTION-001. Constructs: CreateTablespace, CreateUndoTablespace, AlterTablespaceDatafile, AlterTablespace, AlterTablespaceAccess, RenameTablespace, AlterUndoTablespace, DropTablespace, DropUndoTablespace. Terminates: every child is a strict subtree. Source: https://dev.mysql.com/doc/refman/8.4/en/create-tablespace.html, https://dev.mysql.com/doc/refman/8.4/en/alter-tablespace.html, https://dev.mysql.com/doc/refman/8.4/en/drop-tablespace.html. Status: Implemented.
Methods§
public function __construct(private Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
Lowers a tablespace statement.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 2
- method-call SqlSemantics\Platform\MySql\Lowering\Server\StatementRule::area() packages/sql-semantics-mysql/src/Lowering/Server/StatementRule.php:121
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:92
Calls 14
- class-const TablespaceRule::DETAILED() line 91
- method-call TablespaceRule::statement() line 92
- method-call Lowering::form() line 92
- method-call Form::node() line 92
- class-const TablespaceRule::DATAFILES() line 94
- new AlterTablespaceDatafile line 97
- method-call TablespaceRule::name() line 97
- method-call TablespaceRule::datafile() line 97
- method-call TablespaceRule::options() line 97
- new CreateTablespace line 101
- method-call TablespaceRule::group() line 104
- method-call TablespaceRule::optionalDatafile() line 109
- new CreateUndoTablespace line 113
- method-call TablespaceRule::change() line 118
Lowers the ALTER and DROP forms other than the data file forms.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 12
- new AlterTablespaceAccess line 130
- method-call TablespaceRule::name() line 130
- method-call Form::node() line 130
- method-call TablespaceRule::access() line 130
- new RenameTablespace line 131
- new AlterTablespace line 132
- method-call TablespaceRule::options() line 132
- new AlterUndoTablespace line 133
- method-call TablespaceRule::active() line 135
- new DropTablespace line 138
- new DropUndoTablespace line 143
- static-call ImplementationGap::production() line 144
Lowers a tablespace or log file group name: a node of ident, tablespace_name or logfile_group_name.
Parameters
$name | Node |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 13
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\LogfileGroupRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Storage/LogfileGroupRule.php:65
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\LogfileGroupRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Storage/LogfileGroupRule.php:75
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:97
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:102
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:108
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:114
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::change() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:130
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::change() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:131
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::change() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:132
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::change() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:134
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::change() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:139
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::change() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:142
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::change() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:143
Calls 1
- method-call Lowering::form() line 155
Lowers a data file: a node of ts_datafile.
Parameters
$datafile | Node |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 4
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:97
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:103
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:115
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::optionalDatafile() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:189
Calls 2
- method-call Lowering::form() line 170
- static-call ImplementationGap::production() line 172
Lowers the optional data file of MySQL 8.0: a node of opt_ts_datafile_name.
Parameters
$datafile | Node |
Returns
?TextThrows
ImplementationGap When a production has no ruleCalled from 1
Calls 3
- method-call Lowering::form() line 185
- method-call TablespaceRule::datafile() line 189
- static-call ImplementationGap::production() line 190
Lowers USE LOGFILE GROUP: a node of opt_logfile_group_name.
Parameters
$group | Node |
Returns
?NameThrows
ImplementationGap When a production has no ruleCalled from 2
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:104
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:110
Calls 2
- method-call Lowering::form() line 201
- static-call ImplementationGap::production() line 206
public function access(Node $mode): TablespaceAccessLowers an access mode: a node of ts_access_mode.
Parameters
$mode | Node |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 3
- method-call Lowering::form() line 217
- class-const TablespaceRule::ACCESS() line 219
- static-call ImplementationGap::production() line 219
public function active(Node $state): boolLowers ACTIVE or INACTIVE: a node of undo_tablespace_state.
Parameters
$state | Node |
Returns
boolThrows
ImplementationGap When a production has no ruleCalled from 1
Calls 2
- method-call Lowering::form() line 229
- static-call ImplementationGap::production() line 234
public function options(Node $list): list<StorageOption>Lowers an option list.
Parameters
$list | Node |
Returns
list<StorageOption>Throws
ImplementationGap When a production has no ruleCalled from 11
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\LogfileGroupRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Storage/LogfileGroupRule.php:67
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\LogfileGroupRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Storage/LogfileGroupRule.php:76
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:97
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:105
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:111
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:116
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::change() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:132
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::change() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:136
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::change() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:140
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::change() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:142
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::change() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:143
Calls 2
- method-call StorageOptionRule::options() line 246
- new StorageOptionRule line 246
Private surface 4§
Implementation details, listed for orientation only.
private const DETAILED = ['create: CREATE TABLESPACE tablespace_info' => true, 'create: CREATE TABLESPAC…private const DATAFILES = ['alter_tablespace_info: tablespace_name ADD ts_datafile alter_tablespace_optio…private const ACCESS = ['ts_access_mode: READ_ONLY_SYM' => \SqlSemantics\Platform\MySql\Statement\Serv…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
TablespaceRuleTestcalls
Relations§
Instantiated in 2
- new SqlSemantics\Platform\MySql\Lowering\Server\StatementRule::area() packages/sql-semantics-mysql/src/Lowering/Server/StatementRule.php:121
- new SqlSemantics\Platform\MySql\Lowering\Server\Storage\LogfileGroupRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Storage/LogfileGroupRule.php:62
Method calls 5
- method-call SqlSemantics\Platform\MySql\Lowering\Server\StatementRule::area() packages/sql-semantics-mysql/src/Lowering/Server/StatementRule.php:121
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\LogfileGroupRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Storage/LogfileGroupRule.php:65
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\LogfileGroupRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Storage/LogfileGroupRule.php:67
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\LogfileGroupRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Storage/LogfileGroupRule.php:75
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Storage\LogfileGroupRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Storage/LogfileGroupRule.php:76