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

A bare NULL column constraint: the statement that the column may hold NULL.

Rule: SQLITE-COLUMN-NULL-001. The clause is accepted for compatibility and changes nothing, with or without a conflict resolution; it does not undo a NOT NULL constraint of the same column. Source: https://sqlite.org/lang_createtable.html (grammar ccons ::= NULL onconf). Status: Implemented.

Keeping a NULL constraint without effect on the columndoctest
$create = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('CREATE TABLE t (a INT NULL)');
    $create->declarations()[0]->columns[0]->nullability // => \SqlSemantics\Platform\Sqlite\Model\Statement\Type\Nullability::Nullable

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 2§

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 1

Relations§

Instantiated in 1