final class Normalize
    implements Scalar, OutputNaming
    uses Snapshot
Public API: explicitly declared with @visibility public.

NORMALIZE (value [, form]): a string converted to a Unicode normal form.

The server calls pg_catalog.normalize(value[, 'form']); without a form the function's default NFC applies, but the form written is kept. Rule: PG-NORMALIZE-001. Facts: those of the call (PG-CALL-RESULT-001, the form passed as a text constant). The result column is named normalize. Source: https://www.postgresql.org/docs/17/functions-string.html. Status: Implemented.

Reading a normalizationdoctest
$normalize = new \SqlSemantics\Platform\PostgreSql\Statement\Invocation\Syntax\Normalize(new \SqlSemantics\Platform\PostgreSql\Statement\Literal\NullLiteral(), \SqlSemantics\Platform\PostgreSql\Statement\Option\NormalForm::Nfkc);
    [$normalize->form->value, $normalize->outputName()->value] // => ['NFKC', 'normalize']

Properties§

public Scalar $value
public NormalForm|null $form = null

Methods§

public function __construct(public Scalar $value, public NormalForm|null $form = null)

Parameters

$valueScalarThe string normalized
$formNormalForm|nullThe normal form written
public function outputName(): Name

Names an unaliased result column after the function the server calls.

Returns

Test cases 1
Calls 1
public function deriveScalar(Derivation $derivation, Environment $environment): ScalarFact

Derives the value and the result of pg_catalog.normalize.

Parameters

$derivationDerivation
$environmentEnvironment

Returns

Calls 7
public function render(Output $out): void

Writes NORMALIZE with the value and the form.

Parameters

$outOutput
Test cases 1
Calls 2

Test cases 3§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 3

Relations§

Instantiated in 2