final class IdentityGeneration
    implements Node
    uses Snapshot
Public API: explicitly declared with @visibility public.

SET GENERATED { ALWAYS | BY DEFAULT } of an identity column.

Mirrors the generated DefElem of AT_SetIdentity. Source: https://www.postgresql.org/docs/17/sql-altertable.html.

Changing when an identity is generateddoctest
$statement = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER TABLE t ALTER a SET GENERATED ALWAYS');
    $statement->statement->commands[0]->options[0]->when // => \SqlSemantics\Platform\PostgreSql\Statement\Constraint\Column\GeneratedWhen::Always

Properties§

Methods§

public function __construct(public GeneratedWhen $when)

Parameters

$whenGeneratedWhenWhen the column takes a generated value
public function render(Output $out): void

Writes SET GENERATED and when.

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 1
Type checks 1