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

A named placeholder, written :name, which a profile with the named parameter style reads as a parameter.

The server has no such marker; a client library replaces it before the statement is sent. Rule: PG-PARAMETER-002. Facts: the type and NULL fact depend on the bound value. Status: Implemented.

Reading a named placeholderdoctest
$semantics = new \SqlSemantics\Platform\PostgreSql\Semantics(null, null, \SqlSemantics\Platform\PostgreSql\Model\Contract\ParameterStyle::Named);
    $semantics->analyze('SELECT :id')->statement->targets[0]->expression->name // => 'id'

Properties§

public string $name

Methods§

public function __construct(public string $name)

Parameters

$namestringThe placeholder name without the colon
Calls 2
public function outputName(): ?Name

Gives a result column no name.

Returns

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

Derives facts that depend on the bound value.

Parameters

$derivationDerivation
$environmentEnvironment

Returns

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

Writes the placeholder.

Parameters

$outOutput
Test cases 1
Calls 1

Test cases 5§

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

Dedicated tests 4
Other tests reaching this symbol 1

Relations§

Instantiated in 1
Type checks 1