interface Constraint
    extends Clause
Public API: explicitly declared with @visibility public.

A constraint of a column, a table or a domain.

Mirrors PostgreSQL's Constraint node: each implementation is one value of its ConstrType, and its expressions are derived in the environment the owner of the constraint gives. Source: https://www.postgresql.org/docs/17/ddl-constraints.html.

Reading the kind of a column constraintdoctest
$create = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE TABLE t (a int NOT NULL)');
    $create->statement->definition->elements[0]->qualifiers[0]->kind() // => \SqlSemantics\Platform\PostgreSql\Statement\Constraint\ConstraintKind::NotNull

Methods§

public function kind(): ConstraintKind

Answers the kind of the constraint.

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§

Implemented by 15
Method calls 1
Type checks 3
Type declarations 5