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

CREATE COLLATION [IF NOT EXISTS] name FROM existing: defines a collation as a copy of another.

Mirrors PostgreSQL's DefineStmt for collations whose definition is the single attribute from. Source: https://www.postgresql.org/docs/17/sql-createcollation.html.

Reading the copied collationdoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE COLLATION german FROM "de_DE"');
    $operation->statement->source->last()->value // => 'de_DE'

Properties§

public DottedName $name
public DottedName $source
public bool $ifNotExists = false

Methods§

public function __construct(
    public DottedName $name,
    public DottedName $source,
    public bool $ifNotExists = false,
)

Parameters

$nameDottedNameThe new collation
$sourceDottedNameThe existing collation
$ifNotExistsboolWhether IF NOT EXISTS is written
public function deriveStatement(Derivation $derivation): void

Derives nothing: collations cannot be declared in the context.

Parameters

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

Writes the statement.

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