classEnableSubscription
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.
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER SUBSCRIPTION s DISABLE');
$operation->statement->enable // => falseProperties§
public Name $namepublic bool $enableMethods§
public function __construct(public Name $name, public bool $enable)Parameters
$name | Name | The subscription name |
$enable | bool | Whether the subscription is enabled instead of disabled |
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 2
- method-call Output::keyword() line 49
- class-const NameUse::Column() line 49
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
EnableSubscriptionTestcalls
Relations§
Instantiated in 2
- new SqlSemantics\Platform\PostgreSql\Lowering\Catalog\SubscriptionRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/SubscriptionRule.php:62
- new SqlSemantics\Platform\PostgreSql\Lowering\Catalog\SubscriptionRule::statement() packages/sql-semantics-postgres/src/Lowering/Catalog/SubscriptionRule.php:63