final class AlterDomainNotNull
    implements Statement
    uses Snapshot
Public API: explicitly declared with @visibility public.

A request to forbid or allow NULL values of a domain: ALTER DOMAIN name { SET | DROP } NOT NULL.

Rule: PG-DOMAIN-004. Mirrors AlterDomainStmt subtype 'O' (SET) or 'N' (DROP). Source: https://www.postgresql.org/docs/17/sql-alterdomain.html. Status: Implemented.

Forbidding NULL valuesdoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER DOMAIN d SET NOT NULL');
    $operation->statement->notNull // => true

Properties§

public DottedName $name
public bool $notNull

Methods§

public function __construct(public DottedName $name, public bool $notNull)

Parameters

$nameDottedNameThe domain name
$notNullboolWhether NULL is forbidden (SET) instead of allowed (DROP)
public function deriveStatement(Derivation $derivation): void

Derives nothing: the request holds no expression and domains are not part of a declaration context.

Parameters

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

Writes the request.

Parameters

$outOutput
Calls 1

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§

Instantiated in 2