classDropRule
final class DropRule
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§
Lowers a DROP statement of the family.
Parameters
$statement | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 8
- method-call ObjectRule::has() line 68
- new ObjectRule line 68
- function-call
countline 69 - class-const DropRule::SIGNED() line 70
- new Drop line 72
- method-call DropRule::signed() line 72
- class-const ObjectKind::Index() line 75
- method-call DropRule::generic() line 78
public function signed(Form $form, ObjectKind $kind, int $at): list<ObjectReference>Lowers the objects of a routine, aggregate, operator, operator class or operator family DROP.
Parameters
$form | Form | |
$kind | ObjectKind | |
$at | int |
Returns
list<ObjectReference>Test cases 1
Called from 1
Calls 10
- new SignatureRule line 88
- class-const ObjectKind::Aggregate() line 92
- method-call SignatureRule::aggregates() line 92
- method-call Form::node() line 92
- class-const ObjectKind::Operator() line 93
- method-call SignatureRule::operators() line 93
- class-const ObjectKind::OperatorClass() line 94
- class-const ObjectKind::OperatorFamily() line 94
- new OperatorGroupName line 94
- method-call SignatureRule::functions() line 95
public function generic(Form $form, bool $ifExists, ?DropBehavior $behavior): DropLowers the DropStmt productions that name their kind with a kind nonterminal, TYPE or DOMAIN.
Parameters
$form | Form | |
$ifExists | bool | |
$behavior | ?DropBehavior |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 10
- new ObjectRule line 106
- method-call ObjectRule::kind() line 110
- method-call Form::node() line 110
- method-call DropRule::unqualified() line 111
- new MemberName line 112
- class-const ObjectKind::Type() line 113
- method-call DropRule::types() line 113
- class-const ObjectKind::Domain() line 114
- static-call ImplementationGap::production() line 115
- new Drop line 118
public function unqualified(list<Name> $names): list<UnqualifiedName>Answers each name as an unqualified object name.
Parameters
$names | list<Name> |
Returns
list<UnqualifiedName>Test cases 1
Called from 1
Calls 1
public function types(Node $list): list<TypeReference>Lowers type_name_list into type references.
Parameters
$list | Node |
Returns
list<TypeReference>Test cases 1
Called from 2
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Routine\DropRule::generic() packages/sql-semantics-postgres/src/Lowering/Routine/DropRule.php:113
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Routine\DropRule::generic() packages/sql-semantics-postgres/src/Lowering/Routine/DropRule.php:114
Calls 1
Private surface 2§
Implementation details, listed for orientation only.
private const SIGNED = ['RemoveFuncStmt: DROP FUNCTION function_with_argtypes_list opt_drop_behavior' …private Lowering $loweringTest cases 5§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.