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

A request to remove a subscription.

Rule: PG-SUBSCRIPTION-007. Mirrors DropSubscriptionStmt. Source: https://www.postgresql.org/docs/17/sql-dropsubscription.html. Status: Implemented.

Dropping a subscription if it existsdoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('DROP SUBSCRIPTION IF EXISTS s CASCADE');
    $operation->toString() // => 'DROP SUBSCRIPTION IF EXISTS s CASCADE'

Properties§

public Name $name
public bool $ifExists = false
public DropBehavior|null $behavior = null

Methods§

public function __construct(
    public Name $name,
    public bool $ifExists = false,
    public DropBehavior|null $behavior = null,
)

Parameters

$nameNameThe subscription name
$ifExistsboolWhether IF EXISTS is written
$behaviorDropBehavior|nullThe drop behavior, when written
public function deriveStatement(Derivation $derivation): void

Derives nothing: subscriptions are 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