classDropSubscription
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.
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('DROP SUBSCRIPTION IF EXISTS s CASCADE');
$operation->toString() // => 'DROP SUBSCRIPTION IF EXISTS s CASCADE'Properties§
public Name $namepublic bool $ifExists = falsepublic DropBehavior|null $behavior = nullMethods§
public function __construct(
public Name $name,
public bool $ifExists = false,
public DropBehavior|null $behavior = null,
)Parameters
$name | Name | The subscription name |
$ifExists | bool | Whether IF EXISTS is written |
$behavior | DropBehavior|null | The drop behavior, when written |
public function deriveStatement(Derivation $derivation): voidDerives nothing: subscriptions are 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 51
- method-call Output::name() line 55
- class-const NameUse::Column() line 55
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
DropSubscriptionTestcalls
Relations§
Instantiated in 2
- new SqlSemantics\Platform\PostgreSql\Lowering\Catalog\SubscriptionRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/SubscriptionRule.php:64
- new SqlSemantics\Platform\PostgreSql\Lowering\Catalog\SubscriptionRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/SubscriptionRule.php:65