final class AlterRoutine
    implements Statement
    uses Snapshot
Public API: explicitly declared with @visibility public.

ALTER PROCEDURE or ALTER FUNCTION: changes the characteristics of a stored routine.

Rule: MYSQL-ALTER-ROUTINE-001. The statement is structured as a request only: it changes no context and derives nothing. The parameters and the body of a routine cannot be altered, and DETERMINISTIC is no characteristic of ALTER. Source: https://dev.mysql.com/doc/refman/8.4/en/alter-procedure.html, https://dev.mysql.com/doc/refman/8.4/en/alter-function.html. Status: Implemented.

Reading an ALTER FUNCTIONdoctest
$alter = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('ALTER FUNCTION shop.f NO SQL');
    [$alter->statement->kind, count($alter->statement->characteristics)] // => [\SqlSemantics\Platform\MySql\Statement\Routine\ProgramKind::Function, 1]

Properties§

public list<Characteristic> $characteristics
public ProgramKind $kind

Methods§

public function __construct(
    public ProgramKind $kind,
    public QualifiedName $name,
    list<Characteristic> $characteristics = [],
)

Parameters

$kindProgramKindWhether a procedure or a function is altered
$nameQualifiedNameThe routine name with its optional database
$characteristicslist<Characteristic>The new characteristics; may be empty
Calls 5
public function deriveStatement(Derivation $derivation): void

Derives nothing: altering a routine is a request.

Parameters

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

Writes the statement.

Parameters

$outOutput
Test cases 1
Calls 4

Test cases 14§

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

Dedicated tests 6
Other tests reaching this symbol 8

Relations§

Instantiated in 1
Type checks 1
Type declarations 1