final class OptionRule
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.

Lowers routine options and ALTER FUNCTION, PROCEDURE and ROUTINE.

Rule: PG-ROUTINE-OPTION-LOWER-001. Scope: opt_createfunc_opt_list, createfunc_opt_list, createfunc_opt_item, common_func_opt_item, func_as, transform_type_list, AlterFunctionStmt, alterfunc_opt_list, opt_restrict. Constructors: the routine options and AlterRoutine. EXTERNAL before SECURITY and the trailing RESTRICT of ALTER are noise words the server ignores. A configuration setting is lowered by the utility family. Termination: lists are flattened iteratively. Source: https://www.postgresql.org/docs/17/sql-createfunction.html, https://www.postgresql.org/docs/17/sql-alterfunction.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe hub
public function definition(Node $definition, ?Name $language): RoutineDefinition

Lowers func_as: the definition in the routine's language, null when none is written.

Parameters

$definitionNode
$language?Name

Throws

ImplementationGap When the production has no rule
Test cases 1
Called from 1
Calls 3
public function transforms(Node $list): list<TypeName>

Private surface 3§

Implementation details, listed for orientation only.

private const ATTRIBUTES = ['common_func_opt_item: CALLED ON NULL_P INPUT_P' => \SqlSemantics\Platform\Pos…
private const ALTERED = ['AlterFunctionStmt: ALTER FUNCTION function_with_argtypes alterfunc_opt_list o…
private Lowering $lowering

Test cases 6§

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

Dedicated tests 6

Relations§

Instantiated in 2
Method calls 5