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

A request to set or remove the default of a domain: ALTER DOMAIN name { SET DEFAULT expression | DROP DEFAULT }.

Rule: PG-DOMAIN-003. Mirrors AlterDomainStmt subtype 'T'. The default expression is evaluated where no column is visible. Source: https://www.postgresql.org/docs/17/sql-alterdomain.html. Status: Implemented.

Removing the defaultdoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER DOMAIN d DROP DEFAULT');
    $operation->statement->default // => null

Properties§

public DottedName $name
public Scalar|null $default

Methods§

public function __construct(public DottedName $name, public Scalar|null $default)

Parameters

$nameDottedNameThe domain name
$defaultScalar|nullThe new default; null for DROP DEFAULT
public function deriveStatement(Derivation $derivation): void

Derives the default expression.

Parameters

$derivationDerivation
Calls 2
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 1