final class NamedAction
    implements AlterCommand
    uses Snapshot
Public API: explicitly declared with @visibility public.

A relation action on one named object.

One AlterTableCmd with a name; see NamedActionKind. The named index, constraint, tablespace, trigger or rule is looked up by the server; a version 1 context declares none of them. Source: https://www.postgresql.org/docs/17/sql-altertable.html.

Reading a named actiondoctest
$statement = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER TABLE t DISABLE TRIGGER audit');
    [$statement->statement->commands[0]->kind, $statement->statement->commands[0]->name->value] // => [\SqlSemantics\Platform\PostgreSql\Statement\Table\Alter\NamedActionKind::DisableTrigger, 'audit']

Properties§

public Name $name

Methods§

public function __construct(public NamedActionKind $kind, public Name $name)

Parameters

$kindNamedActionKindThe action
$nameNameThe object
public function deriveClause(Derivation $derivation, Environment $environment): void

Derives nothing: the object is a catalog name.

Parameters

$derivationDerivation
$environmentEnvironment
public function render(Output $out): void

Writes the keywords and the name.

Parameters

$outOutput
Calls 2

Test cases 2§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1
Other tests reaching this symbol 1

Relations§

Instantiated in 1
Type checks 1