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

Lowers object kinds and the object names of the generic object commands.

Rule: PG-OBJECT-LOWER-001. Scope: object_type_any_name, object_type_name, drop_type_name, object_type_name_on_any_name, and the object part of CommentStmt, SecLabelStmt, RenameStmt, AlterObjectSchemaStmt, AlterOwnerStmt and AlterObjectDependsStmt. Constructors: ObjectKind cases and the object references of PG-OBJECT-FORM-001. The object part is read from the nonterminal or keyword that starts it, so one reader serves every production of these commands; the commands claim their productions. PROCEDURAL before LANGUAGE is a noise word. Termination: a fixed number of children is read. Source: https://www.postgresql.org/docs/17/sql-comment.html, https://www.postgresql.org/docs/17/sql-drop-owned.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe hub
public function kind(Node $kind): ObjectKind

Lowers object_type_any_name, object_type_name, drop_type_name or object_type_name_on_any_name.

Parameters

$kindNode

Returns

Throws

ImplementationGap When the production has no rule
Test cases 2
Called from 8
Calls 5
public function operator(Form $form, int $at): array{ObjectKind, ObjectReference}
public function altered(Form $form, int $at): array{ObjectReference, int}

Private surface 3§

Implementation details, listed for orientation only.

private const KINDS = ['object_type_any_name: TABLE' => 'TABLE', 'object_type_any_name: SEQUENCE' => …
private const ROUTINES = ['FUNCTION' => \SqlSemantics\Platform\PostgreSql\Statement\Name\ObjectKind::Fun…
private Lowering $lowering

Test cases 10§

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

Dedicated tests 10

Relations§

Instantiated in 10
Method calls 18