classColumnAttributes
final class ColumnAttributes
implements AlterCommand
uses Snapshot
Public API: explicitly declared with
@visibility public.ALTER [ COLUMN ] ... SET ( ... ) or RESET ( ... ): the per-column options.
Mirrors AT_SetOptions and AT_ResetOptions. Source: https://www.postgresql.org/docs/17/sql-altertable.html.
$statement = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER TABLE t ALTER a SET (n_distinct = 100)');
$statement->toString() // => 'ALTER TABLE t ALTER a SET (n_distinct = 100)'Properties§
public non-empty-list<Definition> $optionspublic Name $columnpublic bool $resetMethods§
public function __construct(public Name $column, public bool $reset, list<Definition> $options)Parameters
$column | Name | The column |
$reset | bool | Whether the options are reset; set otherwise |
$options | list<Definition> | The options |
Calls 2
- static-call Check::listOf() line 45
- class-const Definition::class() line 45
public function deriveClause(Derivation $derivation, Environment $environment): voidChecks that the column exists and derives the options.
Parameters
$derivation | Derivation | |
$environment | Environment |
Calls 2
- method-call Alterations::column() line 53
- new Alterations line 53
public function render(Output $out): voidWrites the action.
Parameters
$out | Output |
Calls 3
- method-call Output::keyword() line 64
- method-call Writing::definitions() line 65
- new Writing line 65
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
ColumnAttributesTestcalls
Relations§
Instantiated in 2
- new SqlSemantics\Platform\PostgreSql\Lowering\Table\AlterCommandRule::column() packages/sql-semantics-postgres/src/Lowering/Table/AlterCommandRule.php:150
- new SqlSemantics\Platform\PostgreSql\Lowering\Table\AlterCommandRule::column() packages/sql-semantics-postgres/src/Lowering/Table/AlterCommandRule.php:151