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.

Removing a tablespacedoctest
$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> $options
public Name $name

Methods§

public function __construct(public Name $name, list<StorageOption> $options = [])

Parameters

$nameNameThe tablespace name
$optionslist<StorageOption>The options in written order
Calls 3
public function deriveStatement(Derivation $derivation): void

Reports the options the server rejects while it parses the statement.

Parameters

$derivationDerivation
Calls 2
public function render(Output $out): void

Writes the request.

Parameters

$outOutput
Calls 4

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