classAlterDomainNotNull
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.
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER DOMAIN d SET NOT NULL');
$operation->statement->notNull // => trueProperties§
public DottedName $namepublic bool $notNullMethods§
public function __construct(public DottedName $name, public bool $notNull)Parameters
$name | DottedName | The domain name |
$notNull | bool | Whether NULL is forbidden (SET) instead of allowed (DROP) |
public function deriveStatement(Derivation $derivation): voidDerives nothing: the request holds no expression and domains are not part of a declaration context.
Parameters
$derivation | Derivation |
public function render(Output $out): voidTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
AlterDomainNotNullTestcalls