final class CommandRule
Restricted visibility: declared "@visibility SqlSemantics\Platform\PostgreSql\Lowering". Code outside that scope must not name this declaration.

Lowers CALL, DO, NOTIFY, LISTEN, UNLISTEN and LOAD.

Rule: PG-COMMAND-LOWER-001. Scope: CallStmt, DoStmt, dostmt_opt_list, dostmt_opt_item, NotifyStmt, notify_payload, ListenStmt, UnlistenStmt, LoadStmt. Constructors: Call, DoBlock, DoLanguage, Notify, Listen, Unlisten, Load. The call of CALL is lowered by the invocation family. Termination: the item list is flattened iteratively. Source: https://www.postgresql.org/docs/17/sql-call.html, https://www.postgresql.org/docs/17/sql-do.html, https://www.postgresql.org/docs/17/sql-notify.html, https://www.postgresql.org/docs/17/sql-listen.html, https://www.postgresql.org/docs/17/sql-unlisten.html, https://www.postgresql.org/docs/17/sql-load.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe hub
public function call(Node $application): Call
public function items(Node $list): list<StringConstant|DoLanguage>

Lowers dostmt_opt_list: the code strings and language clauses in the order written.

Parameters

$listNode

Throws

ImplementationGap When the production has no rule
Called from 1
Calls 3
public function payload(Node $payload): ?StringConstant

Lowers notify_payload; no payload is null.

Parameters

$payloadNode

Throws

ImplementationGap When the production has no rule
Called from 1
Calls 1

Private surface 1§

Implementation details, listed for orientation only.

private Lowering $lowering

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
Method calls 1