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

Lowers the DROP statements of the routine family.

Rule: PG-DROP-LOWER-001. Scope: DropStmt, RemoveFuncStmt, RemoveAggrStmt, RemoveOperStmt, DropOpClassStmt, DropOpFamilyStmt. Constructor: Drop, as PostgreSQL builds one DropStmt for all of them. Termination: lists are flattened iteratively. Source: https://www.postgresql.org/docs/17/sql-droptable.html, https://www.postgresql.org/docs/17/sql-dropfunction.html, https://www.postgresql.org/docs/17/sql-dropopclass.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe hub
public function drop(Node $statement): Drop

Lowers a DROP statement of the family.

Parameters

$statementNode

Returns

Throws

ImplementationGap When the production has no rule
Test cases 1
Called from 1
Calls 8
public function signed(Form $form, ObjectKind $kind, int $at): list<ObjectReference>
public function generic(Form $form, bool $ifExists, ?DropBehavior $behavior): Drop

Lowers the DropStmt productions that name their kind with a kind nonterminal, TYPE or DOMAIN.

Parameters

$formForm
$ifExistsbool
$behavior?DropBehavior

Returns

Throws

ImplementationGap When the production has no rule
Test cases 1
Called from 1
Calls 10
public function unqualified(list<Name> $names): list<UnqualifiedName>

Private surface 2§

Implementation details, listed for orientation only.

private const SIGNED = ['RemoveFuncStmt: DROP FUNCTION function_with_argtypes_list opt_drop_behavior' …
private Lowering $lowering

Test cases 5§

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

Dedicated tests 5

Relations§

Instantiated in 1
Method calls 1