classAlterObjectRule
final class AlterObjectRule
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.
Lowers ALTER ... SET SCHEMA, OWNER TO and DEPENDS ON EXTENSION.
Rule: PG-ALTER-OBJECT-LOWER-001. Scope: AlterObjectSchemaStmt, AlterOwnerStmt, AlterObjectDependsStmt, opt_no. Constructors: SetSchema, ChangeOwner, ExtensionDependency; the object part is read by PG-OBJECT-LOWER-001. Source: https://www.postgresql.org/docs/17/sql-alterfunction.html, https://www.postgresql.org/docs/17/sql-altertable.html. Status: Implemented.
Methods§
Lowers AlterObjectSchemaStmt.
Parameters
$statement | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 9
- static-call ObjectKind::from() line 118
- class-const AlterObjectRule::SCHEMAS() line 118
- static-call ImplementationGap::production() line 118
- new ObjectRule line 119
- method-call ObjectRule::altered() line 120
- method-call ObjectRule::start() line 120
- new SetSchema line 122
- function-call
countline 122 - method-call ObjectRule::has() line 122
public function owner(Node $statement): ChangeOwnerLowers AlterOwnerStmt.
Parameters
$statement | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 8
- static-call ObjectKind::from() line 133
- class-const AlterObjectRule::OWNERS() line 133
- static-call ImplementationGap::production() line 133
- new ObjectRule line 134
- method-call ObjectRule::altered() line 135
- method-call ObjectRule::start() line 135
- new ChangeOwner line 137
- function-call
countline 137
public function depends(Node $statement): ExtensionDependencyLowers AlterObjectDependsStmt.
Parameters
$statement | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 8
- static-call ObjectKind::from() line 148
- class-const AlterObjectRule::DEPENDS() line 148
- static-call ImplementationGap::production() line 148
- new ObjectRule line 149
- method-call ObjectRule::altered() line 150
- method-call ObjectRule::start() line 150
- new ExtensionDependency line 158
- function-call
countline 158
Private surface 4§
Implementation details, listed for orientation only.
private const SCHEMAS = ['AlterObjectSchemaStmt: ALTER AGGREGATE aggregate_with_argtypes SET SCHEMA nam…private const OWNERS = ['AlterOwnerStmt: ALTER AGGREGATE aggregate_with_argtypes OWNER TO RoleSpec' =>…private const DEPENDS = ['AlterObjectDependsStmt: ALTER FUNCTION function_with_argtypes opt_no DEPENDS …private Lowering $loweringTest cases 3§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 3
Relations§
Instantiated in 3
- new SqlSemantics\Platform\PostgreSql\Lowering\Routine\Routines::statement() packages/sql-semantics-postgres/src/Lowering/Routine/Routines.php:54
- new SqlSemantics\Platform\PostgreSql\Lowering\Routine\Routines::statement() packages/sql-semantics-postgres/src/Lowering/Routine/Routines.php:55
- new SqlSemantics\Platform\PostgreSql\Lowering\Routine\Routines::statement() packages/sql-semantics-postgres/src/Lowering/Routine/Routines.php:56
Method calls 3
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Routine\Routines::statement() packages/sql-semantics-postgres/src/Lowering/Routine/Routines.php:54
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Routine\Routines::statement() packages/sql-semantics-postgres/src/Lowering/Routine/Routines.php:55
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Routine\Routines::statement() packages/sql-semantics-postgres/src/Lowering/Routine/Routines.php:56