classCopyCollation
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.
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE COLLATION german FROM "de_DE"');
$operation->statement->source->last()->value // => 'de_DE'Properties§
public DottedName $namepublic DottedName $sourcepublic bool $ifNotExists = falseMethods§
public function __construct(
public DottedName $name,
public DottedName $source,
public bool $ifNotExists = false,
)Parameters
$name | DottedName | The new collation |
$source | DottedName | The existing collation |
$ifNotExists | bool | Whether IF NOT EXISTS is written |
public function deriveStatement(Derivation $derivation): voidDerives nothing: collations cannot be declared in the context.
Parameters
$derivation | Derivation |
public function render(Output $out): voidWrites the statement.
Parameters
$out | Output |
Calls 2
- method-call Output::keyword() line 50
- method-call Output::node() line 54
Test cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
CopyCollationTestcalls