classRewriteRule
final class RewriteRule
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.
Lowers CREATE RULE.
Rule: PG-REWRITE-RULE-LOWER-001. Scope: RuleStmt, RuleActionList, RuleActionMulti, RuleActionStmt, RuleActionStmtOrEmpty, event, opt_instead. An empty statement between semicolons is dropped, as the server drops it; the semicolons are noise (TableNoise). Termination: lists are flattened iteratively. Source: https://www.postgresql.org/docs/17/sql-createrule.html. Status: Implemented.
Methods§
public function rule(Node $statement): CreateRuleLowers RuleStmt.
Parameters
$statement | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 4
- static-call ImplementationGap::production() line 49
- method-call RewriteRule::actions() line 53
- new CreateRule line 55
- class-const RewriteRule::EVENTS() line 57
Lowers RuleActionList: the actions and whether they are parenthesized.
Parameters
$list | Node |
Returns
array{list<Statement>, bool}Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 3
- method-call RewriteRule::action() line 86
- static-call ImplementationGap::production() line 89
- method-call Lowering::items() line 92
Lowers RuleActionStmt.
Parameters
$action | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 2
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Table\RewriteRule::actions() packages/sql-semantics-postgres/src/Lowering/Table/RewriteRule.php:86
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Table\RewriteRule::actions() packages/sql-semantics-postgres/src/Lowering/Table/RewriteRule.php:95
Calls 1
- static-call ImplementationGap::production() line 117
Private surface 2§
Implementation details, listed for orientation only.
private const EVENTS = ['event: SELECT' => \SqlSemantics\Platform\PostgreSql\Statement\Table\View\Rule…private Lowering $loweringTest cases 3§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.