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

One clause of the constraint list written after the columns of a table definition.

The closed set is: a constraint name, PRIMARY KEY, UNIQUE, CHECK and FOREIGN KEY. Source: https://sqlite.org/syntax/table-constraint.html.

Reading a table constraintdoctest
$create = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('CREATE TABLE t (a, b, UNIQUE (a, b))');
    $create->statement->constraints[0]->items[0] instanceof \SqlSemantics\Platform\Sqlite\Statement\Schema\Table\TableConstraint // => true

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