enum GeneratedWhen: string
Public API: explicitly declared with @visibility public.

When a generated or identity column takes its generated value: always, or unless a value is given.

Mirrors generated_when (ATTRIBUTE_IDENTITY_ALWAYS/BY_DEFAULT). Source: https://www.postgresql.org/docs/17/sql-createtable.html.

Reading when an identity column is generateddoctest
$create = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE TABLE t (a int GENERATED BY DEFAULT AS IDENTITY)');
    $create->statement->definition->elements[0]->qualifiers[0]->when // => \SqlSemantics\Platform\PostgreSql\Statement\Constraint\Column\GeneratedWhen::ByDefault

Cases§

case Always = 'ALWAYS'
case ByDefault = 'BY DEFAULT'

Methods§

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§

Method calls 4
Constant reads 3
Type declarations 5