final class CommentRule
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.

Lowers COMMENT ON and SECURITY LABEL.

Rule: PG-COMMENT-LOWER-001. Scope: CommentStmt, comment_text, SecLabelStmt, opt_provider, security_label. Constructors: Comment, SecurityLabel; the object part is read by PG-OBJECT-LOWER-001. NULL removes the comment or label. Source: https://www.postgresql.org/docs/17/sql-comment.html, https://www.postgresql.org/docs/17/sql-security-label.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe hub
public function comment(Node $statement): Comment
public function provider(Node $provider): Word|StringConstant|null

Lowers opt_provider; no provider is null.

Parameters

$providerNode

Returns

Throws

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

Private surface 3§

Implementation details, listed for orientation only.

private const COMMENTS = ['CommentStmt: COMMENT ON object_type_any_name any_name IS comment_text', 'Comm…
private const LABELS = ['SecLabelStmt: SECURITY LABEL opt_provider ON object_type_any_name any_name IS…
private Lowering $lowering

Test cases 4§

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

Dedicated tests 4

Relations§

Instantiated in 2
Method calls 2