classNotNull
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.
$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::IgnoreProperties§
public ConflictResolution|null $conflict = nullMethods§
public function __construct(public ConflictResolution|null $conflict = null)Parameters
$conflict | ConflictResolution|null | The written ON CONFLICT resolution |
public function deriveConstraint(Derivation $derivation, ConstraintScope $scope): voidDerives nothing: the clause has no operand that depends on a declaration.
Parameters
$derivation | Derivation | |
$scope | ConstraintScope |
public function render(Output $out): voidTest cases 4§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.