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

A request to define a conversion between two character set encodings.

Rule: PG-CONVERSION-001. Mirrors CreateConversionStmt: whether it is the default conversion, name, source and destination encodings and function. Source: https://www.postgresql.org/docs/17/sql-createconversion.html. Status: Implemented.

Reading the encodings of a conversiondoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze("CREATE DEFAULT CONVERSION myconv FOR 'UTF8' TO 'LATIN1' FROM myfunc");
    [$operation->statement->isDefault, $operation->statement->source->value, $operation->statement->target->value] // => [true, 'UTF8', 'LATIN1']

Properties§

public bool $isDefault
public DottedName $name
public StringConstant $source
public StringConstant $target
public DottedName $function

Methods§

public function __construct(
    public bool $isDefault,
    public DottedName $name,
    public StringConstant $source,
    public StringConstant $target,
    public DottedName $function,
)

Parameters

$isDefaultboolWhether DEFAULT is written
$nameDottedNameThe conversion name
$sourceStringConstantThe source encoding
$targetStringConstantThe destination encoding
$functionDottedNameThe conversion function
public function deriveStatement(Derivation $derivation): void

Derives nothing: conversions and their functions are not part of a declaration context.

Parameters

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

Writes the request.

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