final class NotNull
    implements ColumnConstraint
    uses Snapshot
Public API: explicitly declared with @visibility public.

A NOT NULL column constraint.

Rule: SQLITE-COLUMN-NOT-NULL-001. The column cannot hold NULL; the conflict resolution says what a violating write does and defaults to ABORT. Source: https://sqlite.org/lang_createtable.html#not_null_constraints. Status: Implemented.

Reading the conflict resolution of a NOT NULL constraintdoctest
$create = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('CREATE TABLE t (a INT NOT NULL ON CONFLICT IGNORE)');
    $create->statement->columns[0]->constraints[0]->conflict // => \SqlSemantics\Platform\Sqlite\Statement\Mutation\ConflictResolution::Ignore

Properties§

public ConflictResolution|null $conflict = null

Methods§

public function __construct(public ConflictResolution|null $conflict = null)

Parameters

$conflictConflictResolution|nullThe written ON CONFLICT resolution
public function deriveConstraint(Derivation $derivation, ConstraintScope $scope): void

Derives nothing: the clause has no operand that depends on a declaration.

Parameters

$derivationDerivation
$scopeConstraintScope
public function render(Output $out): void

Writes the clause.

Parameters

$outOutput
Calls 1

Test cases 4§

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 3

Relations§

Instantiated in 1
Type checks 1