classCommentRule
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§
Lowers CommentStmt.
Parameters
$statement | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 8
- function-call
in_arrayline 83 - class-const CommentRule::COMMENTS() line 83
- static-call ImplementationGap::production() line 84
- method-call ObjectRule::named() line 86
- new ObjectRule line 86
- new Comment line 88
- method-call CommentRule::text() line 88
- function-call
countline 88
public function label(Node $statement): SecurityLabelLowers SecLabelStmt.
Parameters
$statement | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 9
- function-call
in_arrayline 99 - class-const CommentRule::LABELS() line 99
- static-call ImplementationGap::production() line 100
- method-call ObjectRule::named() line 102
- new ObjectRule line 102
- new SecurityLabel line 104
- method-call CommentRule::text() line 104
- function-call
countline 104 - method-call CommentRule::provider() line 104
public function text(Node $text): ?StringConstantLowers comment_text or security_label; NULL is null.
Parameters
$text | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 2
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Routine\CommentRule::comment() packages/sql-semantics-postgres/src/Lowering/Routine/CommentRule.php:88
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Routine\CommentRule::label() packages/sql-semantics-postgres/src/Lowering/Routine/CommentRule.php:104
Calls 1
- static-call ImplementationGap::production() line 119
public function provider(Node $provider): Word|StringConstant|nullLowers opt_provider; no provider is null.
Parameters
$provider | Node |
Returns
Word|StringConstant|nullThrows
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 1
- static-call ImplementationGap::production() line 135
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 $loweringTest cases 4§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Relations§
Instantiated in 2
Method calls 2
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Routine\Routines::statement() packages/sql-semantics-postgres/src/Lowering/Routine/Routines.php:51
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Routine\Routines::statement() packages/sql-semantics-postgres/src/Lowering/Routine/Routines.php:52