final class DropTablespace
    implements Statement
    uses Snapshot
Public API: explicitly declared with @visibility public.

A request to remove a tablespace.

Rule: PG-TABLESPACE-002. Mirrors DropTableSpaceStmt. Source: https://www.postgresql.org/docs/17/sql-droptablespace.html. Status: Implemented.

Dropping a tablespace if it existsdoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('DROP TABLESPACE IF EXISTS fast');
    [$operation->statement->ifExists, $operation->toString()] // => [true, 'DROP TABLESPACE IF EXISTS fast']

Properties§

public Name $name
public bool $ifExists = false

Methods§

public function __construct(public Name $name, public bool $ifExists = false)

Parameters

$nameNameThe tablespace name
$ifExistsboolWhether IF EXISTS is written
public function deriveStatement(Derivation $derivation): void

Derives nothing: a tablespace is not part of a declaration context.

Parameters

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

Writes the request.

Parameters

$outOutput
Calls 3

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