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

A call of substring, overlay or json_object spelled with the keyword and plain arguments.

The server builds a plain FuncCall. Rule: PG-KEYWORD-CALL-001. Facts: those of the call (PG-CALL-RESULT-001): substring and overlay are searched along the path, json_object in pg_catalog alone; named arguments are left to the routine. JSON_OBJECT takes at least one argument. Source: https://www.postgresql.org/docs/17/functions-string.html, https://www.postgresql.org/docs/17/functions-json.html. Status: Implemented.

Reading a keyword calldoctest
$call = new \SqlSemantics\Platform\PostgreSql\Statement\Invocation\Syntax\KeywordCall(\SqlSemantics\Platform\PostgreSql\Statement\Invocation\Syntax\KeywordFunction::Substring, []);
    [$call->function->value, $call->outputName()->value] // => ['SUBSTRING', 'substring']
Rejecting JSON_OBJECT without arguments in this formdoctest
new \SqlSemantics\Platform\PostgreSql\Statement\Invocation\Syntax\KeywordCall(\SqlSemantics\Platform\PostgreSql\Statement\Invocation\Syntax\KeywordFunction::JsonObject, []) // throws \SqlSemantics\Platform\PostgreSql\Model\Diagnostic\InvalidConstruction

Properties§

public list<Argument> $arguments
public KeywordFunction $function

Methods§

public function __construct(public KeywordFunction $function, list<Argument> $arguments)

Parameters

$functionKeywordFunctionThe function
$argumentslist<Argument>The arguments in order
Calls 3
public function outputName(): Name

Names an unaliased result column after the function.

Returns

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

Derives the arguments and the result of the call.

Parameters

$derivationDerivation
$environmentEnvironment

Returns

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

Writes the keyword and the arguments in parentheses.

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 5

Relations§

Instantiated in 3