final class TransformFunction
    implements Clause
    uses Snapshot
Public API: explicitly declared with @visibility public.

FROM SQL WITH FUNCTION function or TO SQL WITH FUNCTION function of a transform.

Source: https://www.postgresql.org/docs/17/sql-createtransform.html.

Reading the direction of a transform functiondoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE TRANSFORM FOR hstore LANGUAGE plpython3u (TO SQL WITH FUNCTION f(internal))');
    $operation->statement->functions[0]->direction // => \SqlSemantics\Platform\PostgreSql\Statement\Catalog\Cast\TransformDirection::ToSql

Properties§

public TransformDirection $direction
public ObjectReference $function

Methods§

public function __construct(
    public TransformDirection $direction,
    public ObjectReference $function,
)

Parameters

$directionTransformDirectionThe direction
$functionObjectReferenceThe function signature
public function deriveClause(Derivation $derivation, Environment $environment): void

Derives the function signature.

Parameters

$derivationDerivation
$environmentEnvironment
Calls 1
public function render(Output $out): void

Writes the clause.

Parameters

$outOutput
Calls 2

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
Constant reads 1