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

The collation written among the constraints of a column or a domain.

Mirrors the CollateClause that ColQualList collects into the column's collClause. The collation is looked up by the server; a version 1 context declares no collations. Source: https://www.postgresql.org/docs/17/sql-createtable.html, https://www.postgresql.org/docs/17/collation.html.

Reading the collation of a columndoctest
$create = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE TABLE t (a text COLLATE "C")');
    $create->statement->definition->elements[0]->qualifiers[0]->collation->last()->value // => 'C'

Properties§

public DottedName $collation

Methods§

public function __construct(public DottedName $collation)

Parameters

$collationDottedNameThe collation name
public function deriveClause(Derivation $derivation, Environment $environment): void

Derives nothing: the collation is a catalog name.

Parameters

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

Writes COLLATE and the name.

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
Type checks 3