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

Lowers CREATE FUNCTION and CREATE PROCEDURE with their parameters, results and bodies.

Rule: PG-FUNCTION-LOWER-001. Scope: CreateFunctionStmt, func_args_with_defaults, func_args_with_defaults_list, func_arg_with_default, func_return, table_func_column, table_func_column_list, opt_routine_body, ReturnStmt, routine_body_stmt_list, routine_body_stmt. Constructors: CreateFunction, RoutineParameters, ResultTable, ResultColumn, ReturnStatement, AtomicBody. The statements of a BEGIN ATOMIC block are lowered by their own families; an empty statement between semicolons is discarded, as the server does. Termination: lists are flattened iteratively. Source: https://www.postgresql.org/docs/17/sql-createfunction.html, https://www.postgresql.org/docs/17/sql-createprocedure.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe hub
public function result(Node $result): TypeName
public function statements(Node $list): list<Statement|ReturnStatement>

Private surface 1§

Implementation details, listed for orientation only.

private Lowering $lowering

Test cases 8§

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

Dedicated tests 8

Relations§

Instantiated in 1
Method calls 1