classDropTablespace
final class DropTablespace
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.DROP TABLESPACE name [option …]: a request to remove a tablespace.
Mirrors PT_drop_tablespace (Sql_cmd_drop_tablespace) and the DROP_TABLESPACE command of st_alter_tablespace in MySQL 5.x. Rule: MYSQL-DROP-TABLESPACE-001. The options are NDB requests. The options are checked, kept and written in order by MYSQL-STORAGE-OPTIONS-001. A tablespace is no relation, so the statement neither declares nor resolves one. Source: https://dev.mysql.com/doc/refman/8.4/en/drop-tablespace.html. Status: Implemented.
$statement = (new \SqlSemantics\Platform\MySql\Semantics())->analyze("drop tablespace ts engine ndb");
[$statement->toString(), $statement->statement->name->value] // => ["DROP TABLESPACE ts ENGINE `ndb`", 'ts']Properties§
public list<StorageOption> $optionspublic Name $nameMethods§
public function __construct(public Name $name, list<StorageOption> $options = [])Parameters
$name | Name | The tablespace name |
$options | list<StorageOption> | The options in written order |
Calls 3
- method-call StorageOptions::checked() line 45
- new StorageOptions line 45
- class-const StorageOptions::DROP() line 45
public function deriveStatement(Derivation $derivation): voidReports the options the server rejects while it parses the statement.
Parameters
$derivation | Derivation |
Calls 2
- method-call StorageOptions::derive() line 53
- new StorageOptions line 53
public function render(Output $out): voidWrites the request.
Parameters
$out | Output |
Calls 4
- method-call Output::keyword() line 61
- class-const NameUse::Identifier() line 61
- method-call StorageOptions::render() line 62
- new StorageOptions line 62
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
DropTablespaceTestcalls
Relations§
Instantiated in 2
- new SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::change() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:138
- new SqlSemantics\Platform\MySql\Lowering\Server\Storage\TablespaceRule::change() packages/sql-semantics-mysql/src/Lowering/Server/Storage/TablespaceRule.php:142