classIdentityGeneration
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.
$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::AlwaysProperties§
public GeneratedWhen $whenMethods§
public function __construct(public GeneratedWhen $when)Parameters
$when | GeneratedWhen | When the column takes a generated value |
public function render(Output $out): voidWrites SET GENERATED and when.
Parameters
$out | Output |
Calls 2
- method-call Output::keyword() line 39
- method-call GeneratedWhen::keywords() line 39
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
IdentityGenerationTestcalls