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

A variable passed to a JSON path with PASSING: value AS name.

Mirrors PostgreSQL's JsonArgument node. Source: https://www.postgresql.org/docs/17/functions-json.html#FUNCTIONS-SQLJSON-QUERYING.

Reading a path variabledoctest
$argument = new \SqlSemantics\Platform\PostgreSql\Statement\Invocation\Json\Query\JsonArgument(new \SqlSemantics\Platform\PostgreSql\Statement\Invocation\Json\JsonValueExpression(new \SqlSemantics\Platform\PostgreSql\Statement\Literal\NullLiteral()), new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('x'));
    $argument->name->value // => 'x'

Properties§

public Name $name

Methods§

public function __construct(public JsonValueExpression $value, public Name $name)

Parameters

$valueJsonValueExpressionThe value
$nameNameThe variable name the path uses
public function deriveClause(Derivation $derivation, Environment $environment): void

Derives the value.

Parameters

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

Writes the value and its name.

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 2
Other tests reaching this symbol 1

Relations§

Instantiated in 1
Constant reads 1