classDomainNotNull
final class DomainNotNull
implements Clause
uses Snapshot
Public API: explicitly declared with
@visibility public.A NOT NULL constraint added to a domain in release 17: [ CONSTRAINT name ] NOT NULL attributes.
Mirrors the Constraint of kind CONSTR_NOTNULL that DomainConstraintElem builds. Deferral and NOT VALID are diagnostics (PG-DOMAIN-CHECK-001). Source: https://www.postgresql.org/docs/17/sql-alterdomain.html.
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER DOMAIN d ADD CONSTRAINT nn NOT NULL');
$operation->statement->constraint->name?->value // => 'nn'Properties§
public list<ConstraintAttribute> $attributespublic Name|null $name = nullMethods§
public function __construct(
public Name|null $name = null,
list<ConstraintAttribute> $attributes = [],
)Parameters
$name | Name|null | The constraint name, when CONSTRAINT is written |
$attributes | list<ConstraintAttribute> | The attributes in the order written |
Calls 2
- static-call Check::listOf() line 45
- class-const ConstraintAttribute::class() line 45
public function deriveClause(Derivation $derivation, Environment $environment): voidChecks the attributes.
Parameters
$derivation | Derivation | |
$environment | Environment |
Calls 2
- method-call DomainChecks::attributes() line 53
- new DomainChecks line 53
public function render(Output $out): voidWrites the constraint.
Parameters
$out | Output |
Calls 3
- method-call Output::keyword() line 62
- class-const NameUse::Column() line 62
- method-call Output::node() line 66
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
DomainNotNullTestcalls