enum ConstraintKind
Public API: explicitly declared with @visibility public.

The kinds of constraint PostgreSQL distinguishes.

Mirrors the ConstrType values of PostgreSQL's Constraint node other than the attribute markers, which are ConstraintAttribute values here. Source: https://www.postgresql.org/docs/17/sql-createtable.html.

Reading the kind of a table constraintdoctest
$create = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE TABLE t (a int, PRIMARY KEY (a))');
    $create->statement->definition->elements[1]->kind() // => \SqlSemantics\Platform\PostgreSql\Statement\Constraint\ConstraintKind::PrimaryKey

Cases§

case Null
case NotNull
case Default
case Identity
case Generated
case Check
case PrimaryKey
case Unique
case Exclusion
case ForeignKey

Test cases 19§

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 18

Relations§

Constant reads 39
Type declarations 17