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

COLLATION FOR (value): the name of the collation of a value.

The server calls pg_catalog.pg_collation_for(value). Rule: PG-COLLATION-FOR-001. Facts: text, NULL when no collation is derived for the value. The result column is named pg_collation_for. Source: https://www.postgresql.org/docs/17/functions-info.html#FUNCTIONS-INFO-CATALOG. Status: Implemented.

Naming the result columndoctest
(new \SqlSemantics\Platform\PostgreSql\Statement\Invocation\Syntax\CollationFor(new \SqlSemantics\Platform\PostgreSql\Statement\Literal\NullLiteral()))->outputName()->value // => 'pg_collation_for'

Properties§

public Scalar $value

Methods§

public function __construct(public Scalar $value)

Parameters

$valueScalarThe value whose collation is asked
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.pg_collation_for.

Parameters

$derivationDerivation
$environmentEnvironment

Returns

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

Writes COLLATION FOR and the value in parentheses.

Parameters

$outOutput
Test cases 1
Calls 1

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 1