classNamedParameter
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.
$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 $nameMethods§
public function __construct(public string $name)Parameters
$name | string | The placeholder name without the colon |
Calls 2
- static-call Check::input() line 41
- function-call
preg_matchline 41
public function deriveScalar(Derivation $derivation, Environment $environment): ScalarFactDerives facts that depend on the bound value.
Parameters
$derivation | Derivation | |
$environment | Environment |
Returns
Calls 4
- new ScalarFact line 57
- new Dependent line 57
- new UnboundParameter line 57
- class-const Nullability::Dependent() line 57
public function render(Output $out): voidWrites the placeholder.
Parameters
$out | Output |
Test cases 1
Calls 1
- method-call Output::spelled() line 65
Test cases 5§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.