final class AlterCommandRule
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.

Lowers the actions of ALTER TABLE.

Rule: PG-ALTER-COMMAND-LOWER-001. Scope: alter_table_cmd, alter_column_default, alter_using, replica_identity, alter_identity_column_option_list, alter_identity_column_option, set_statistics_value, set_access_method_name. The optional COLUMN words are noise (LeafNoise opt_column, TableNoise ADD COLUMN), and so is SET DATA before TYPE (LeafNoise). Termination: lists are flattened iteratively. Source: https://www.postgresql.org/docs/17/sql-altertable.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe hub
public function using(Node $clause): ?Scalar
public function method(Node $value): ?Name

Lowers set_access_method_name; DEFAULT is null.

Parameters

$valueNode

Returns

Throws

ImplementationGap When the production has no rule
Test cases 1
Called from 1
Calls 1

Private surface 4§

Implementation details, listed for orientation only.

private const TABLE = ['alter_table_cmd: SET WITHOUT OIDS' => \SqlSemantics\Platform\PostgreSql\State…
private const NAMED = ['alter_table_cmd: CLUSTER ON name' => [\SqlSemantics\Platform\PostgreSql\State…
private const COLUMN = ['alter_table_cmd: ALTER opt_column ColId DROP NOT NULL_P' => \SqlSemantics\Pla…
private Lowering $lowering

Test cases 11§

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

Dedicated tests 11

Relations§

Instantiated in 3
Method calls 3