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 __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe hub
public function rule(Node $statement): CreateRule
public function actions(Node $list): array{list<Statement>, bool}

Lowers RuleActionList: the actions and whether they are parenthesized.

Parameters

$listNode

Returns

array{list<Statement>, bool}

Throws

ImplementationGap When the production has no rule
Test cases 1
Called from 1
Calls 3

Private surface 2§

Implementation details, listed for orientation only.

private const EVENTS = ['event: SELECT' => \SqlSemantics\Platform\PostgreSql\Statement\Table\View\Rule…
private Lowering $lowering

Test cases 3§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 3

Relations§

Instantiated in 1
Method calls 1