classExtensionDependency
final class ExtensionDependency
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.ALTER kind object [NO] DEPENDS ON EXTENSION extension: marks or unmarks an object as dependent on an extension.
Mirrors PostgreSQL's AlterObjectDependsStmt (remove is NO). Source: https://www.postgresql.org/docs/17/sql-alterfunction.html, https://www.postgresql.org/docs/17/sql-alterindex.html.
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER INDEX i NO DEPENDS ON EXTENSION e');
[$operation->statement->remove, $operation->statement->extension->value] // => [true, 'e']Properties§
public ObjectKind $kindpublic ObjectReference $objectpublic Name $extensionpublic bool $remove = falseMethods§
public function __construct(
public ObjectKind $kind,
public ObjectReference $object,
public Name $extension,
public bool $remove = false,
)Parameters
$kind | ObjectKind | The kind of the object |
$object | ObjectReference | The object, named as DEPENDS ON EXTENSION names objects of the kind |
$extension | Name | The extension |
$remove | bool | Whether NO is written: the dependency is removed |
Calls 5
- new ObjectForms line 44
- static-call Check::input() line 45
- function-call
in_arrayline 45 - method-call ObjectForms::form() line 45
- method-call ObjectForms::depends() line 45
public function deriveStatement(Derivation $derivation): voidDerives the object.
Parameters
$derivation | Derivation |
Calls 4
- method-call ObjectFacts::derive() line 53
- new ObjectFacts line 53
- method-call RelationKinds::named() line 54
- new RelationKinds line 54
public function render(Output $out): voidWrites the statement.
Parameters
$out | Output |
Calls 5
- method-call Output::keyword() line 62
- method-call ObjectSpelling::kind() line 63
- new ObjectSpelling line 63
- method-call Output::node() line 64
- class-const NameUse::Column() line 68
Test cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.