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.

Reading the removal of a dependencydoctest
$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 $kind
public Name $extension
public bool $remove = false

Methods§

public function __construct(
    public ObjectKind $kind,
    public ObjectReference $object,
    public Name $extension,
    public bool $remove = false,
)

Parameters

$kindObjectKindThe kind of the object
$objectObjectReferenceThe object, named as DEPENDS ON EXTENSION names objects of the kind
$extensionNameThe extension
$removeboolWhether NO is written: the dependency is removed
Calls 5
public function deriveStatement(Derivation $derivation): void

Derives the object.

Parameters

$derivationDerivation
Calls 4
public function render(Output $out): void

Writes the statement.

Parameters

$outOutput
Calls 5

Test cases 2§

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

Dedicated tests 1
Other tests reaching this symbol 1

Relations§

Instantiated in 1
Type declarations 1