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

A request to enable or disable a subscription.

Rule: PG-SUBSCRIPTION-006. Mirrors AlterSubscriptionStmt of kind ALTER_SUBSCRIPTION_ENABLED. Source: https://www.postgresql.org/docs/17/sql-altersubscription.html. Status: Implemented.

Disabling a subscriptiondoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER SUBSCRIPTION s DISABLE');
    $operation->statement->enable // => false

Properties§

public Name $name
public bool $enable

Methods§

public function __construct(public Name $name, public bool $enable)

Parameters

$nameNameThe subscription name
$enableboolWhether the subscription is enabled instead of disabled
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 2

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