classColumnOptions
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.
$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> $qualifierspublic Name $nameMethods§
Parameters
Calls 2
- method-call Qualifiers::checked() line 43
- new Qualifiers line 43
public function deriveClause(Derivation $derivation, Environment $environment): voidDerives the qualifiers in the environment of the table and reports their problems.
Parameters
$derivation | Derivation | |
$environment | Environment |
Calls 2
- method-call Qualifiers::derive() line 51
- new Qualifiers line 51
public function render(Output $out): voidWrites the column name and the qualifiers.
Parameters
$out | Output |
Calls 2
- method-call Output::name() line 59
- method-call Output::node() line 61
Test cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
ColumnOptionsTestcalls
Other tests reaching this symbol 1
Relations§
Instantiated in 2
Type checks 5
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\Declarations::constrain() packages/sql-semantics-postgres/src/Rules/Table/Definition/Declarations.php:164
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\Definitions::report() packages/sql-semantics-postgres/src/Rules/Table/Definition/Definitions.php:153
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\GeneratedColumns::inherited() packages/sql-semantics-postgres/src/Rules/Table/Definition/GeneratedColumns.php:181
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\TableConstraints::typedElements() packages/sql-semantics-postgres/src/Rules/Table/Definition/TableConstraints.php:53
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Table\RelationKinds::foreign() packages/sql-semantics-postgres/src/Rules/Table/RelationKinds.php:166