interface ColumnConstraint
    extends Node
Public API: explicitly declared with @visibility public.

One clause written after the name and type of a column, in written order.

The closed set is: a constraint name, a default, NULL, NOT NULL, PRIMARY KEY, UNIQUE, CHECK, a REFERENCES clause, a DEFERRABLE clause, a collation and a generated column expression. Source: https://sqlite.org/syntax/column-constraint.html.

Reading the constraints of a column in written orderdoctest
$create = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('CREATE TABLE t (a INTEGER NOT NULL DEFAULT 0)');
    count($create->statement->columns[0]->constraints) // => 2

Methods§

public function deriveConstraint(Derivation $derivation, ConstraintScope $scope): void

Derives the facts of the operands of the clause inside the table definition.

Parameters

$derivationDerivation
$scopeConstraintScope

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 13
Constant reads 1
Type declarations 2