classDropTablespace
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.
$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 $namepublic bool $ifExists = falseMethods§
public function __construct(public Name $name, public bool $ifExists = false)Parameters
$name | Name | The tablespace name |
$ifExists | bool | Whether IF EXISTS is written |
public function deriveStatement(Derivation $derivation): voidDerives nothing: a tablespace is not part of a declaration context.
Parameters
$derivation | Derivation |
public function render(Output $out): voidWrites the request.
Parameters
$out | Output |
Calls 3
- method-call Output::keyword() line 49
- method-call Output::name() line 53
- class-const NameUse::Column() line 53
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\PostgreSql\Lowering\Catalog\DatabaseRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/DatabaseRule.php:88
- new SqlSemantics\Platform\PostgreSql\Lowering\Catalog\DatabaseRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/DatabaseRule.php:89