classAlterTablespaceAccess
final class AlterTablespaceAccess
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.ALTER TABLESPACE name {READ_ONLY | READ_WRITE | NOT ACCESSIBLE}: a request to change the access mode of a tablespace (MySQL 5.6 and 5.7).
Mirrors the ALTER_ACCESS_MODE_TABLESPACE command of st_alter_tablespace. Rule: MYSQL-ALTER-TABLESPACE-ACCESS-001. No storage engine of these releases implements it. A tablespace is no relation, so the statement neither declares nor resolves one. Source: https://dev.mysql.com/doc/refman/5.7/en/alter-tablespace.html. Status: Implemented.
$alter = (new \SqlSemantics\Platform\MySql\Semantics('mysql-5.7.44'))->analyze('alter tablespace ts not accessible');
[$alter->toString(), $alter->statement->access] // => ['ALTER TABLESPACE ts NOT ACCESSIBLE', \SqlSemantics\Platform\MySql\Statement\Server\Storage\Option\TablespaceAccess::NotAccessible]Properties§
public Name $namepublic TablespaceAccess $accessMethods§
public function __construct(public Name $name, public TablespaceAccess $access)Parameters
$name | Name | The tablespace name |
$access | TablespaceAccess | The access mode |
public function deriveStatement(Derivation $derivation): voidHas nothing to derive: a tablespace is no relation.
Parameters
$derivation | Derivation |
public function render(Output $out): voidWrites the request.
Parameters
$out | Output |
Calls 3
- method-call Output::keyword() line 54
- class-const NameUse::Identifier() line 54
- function-call
explodeline 54
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.