classCommandRule
final class CommandRule
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§
Lowers one of the commands.
Parameters
$statement | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 9
- method-call CommandRule::call() line 57
- new DoBlock line 58
- method-call CommandRule::items() line 58
- new Notify line 59
- method-call CommandRule::payload() line 59
- new Listen line 60
- new Unlisten line 61
- new Load line 63
- static-call ImplementationGap::production() line 64
Lowers the func_application of CALL.
Parameters
$application | Node |
Returns
Called from 1
Calls 2
- static-call Check::invariant() line 74
- new Call line 76
public function items(Node $list): list<StringConstant|DoLanguage>Lowers dostmt_opt_list: the code strings and language clauses in the order written.
Parameters
$list | Node |
Returns
list<StringConstant|DoLanguage>Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 3
- method-call Lowering::items() line 89
- new DoLanguage line 93
- static-call ImplementationGap::production() line 94
public function payload(Node $payload): ?StringConstantLowers notify_payload; no payload is null.
Parameters
$payload | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 1
- static-call ImplementationGap::production() line 113
Private surface 1§
Implementation details, listed for orientation only.
private Lowering $loweringTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
CommandRuleTestcalls