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

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

$loweringLoweringThe lowering this rule belongs to
public function name(Node $name): Name

Lowers a tablespace or log file group name: a node of ident, tablespace_name or logfile_group_name.

Parameters

$nameNode

Returns

Throws

ImplementationGap When a production has no rule
Called from 13
Calls 1
public function optionalDatafile(Node $datafile): ?Text

Lowers the optional data file of MySQL 8.0: a node of opt_ts_datafile_name.

Parameters

$datafileNode

Returns

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 3
public function access(Node $mode): TablespaceAccess
public function active(Node $state): bool

Lowers ACTIVE or INACTIVE: a node of undo_tablespace_state.

Parameters

$stateNode

Returns

bool

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 2
public function options(Node $list): list<StorageOption>

Lowers an option list.

Parameters

$listNode

Returns

Throws

ImplementationGap When a production has no rule
Called from 11
Calls 2

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 $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 5