final class ColumnOptions
    implements Clause
    uses Snapshot
Public API: explicitly declared with @visibility public.

Constraints added to a column a typed table or a partition takes from its type or parent.

Mirrors the ColumnDef without a type that columnOptions builds. The optional WITH OPTIONS words change nothing ("column_name [ WITH OPTIONS ]

  • [ column_constraint [ ... ] ]") and are not kept.

Source: https://www.postgresql.org/docs/17/sql-createtable.html.

Adding a constraint to a column of a partitiondoctest
$create = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE TABLE p1 PARTITION OF p (a WITH OPTIONS NOT NULL) DEFAULT');
    $create->toString() // => 'CREATE TABLE p1 PARTITION OF p (a NOT NULL) DEFAULT'

Properties§

public list<Clause> $qualifiers
public Name $name

Methods§

public function __construct(public Name $name, list<Clause> $qualifiers = [])

Parameters

$nameNameThe column name
$qualifierslist<Clause>The constraints, deferral attributes and collation, in the order written
Calls 2
public function deriveClause(Derivation $derivation, Environment $environment): void

Derives the qualifiers in the environment of the table and reports their problems.

Parameters

$derivationDerivation
$environmentEnvironment
Calls 2
public function render(Output $out): void

Writes the column name and the qualifiers.

Parameters

$outOutput
Calls 2

Test cases 2§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1
Other tests reaching this symbol 1

Relations§

Instantiated in 2
Type checks 5
Type declarations 1