classRoutineLanguage
final class RoutineLanguage
implements RoutineOption
uses Snapshot
Public API: explicitly declared with
@visibility public.LANGUAGE name: the language the routine is written in.
The name is a word or a string constant; the server looks it up as written after decoding. Without the option, a routine with an SQL-standard body is in language sql. Source: https://www.postgresql.org/docs/17/sql-createfunction.html.
$option = new \SqlSemantics\Platform\PostgreSql\Statement\Routine\Option\RoutineLanguage(new \SqlSemantics\Platform\PostgreSql\Statement\Option\Word(new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('plpgsql')));
$option->name() // => 'plpgsql'Properties§
public Word|StringConstant $languageMethods§
public function __construct(public Word|StringConstant $language)Parameters
$language | Word|StringConstant | The language name |
public function name(): stringAnswers the language name the server looks up.
Returns
stringTest cases 1
public function alterable(): boolTells that ALTER does not accept the option.
Returns
boolTest cases 1
public function setting(): stringpublic function deriveClause(Derivation $derivation, Environment $environment): voidDerives nothing: a name holds no expression.
Parameters
$derivation | Derivation | |
$environment | Environment |
Test cases 1
public function render(Output $out): voidWrites LANGUAGE and the name.
Parameters
$out | Output |
Test cases 1
Calls 1
- method-call Output::keyword() line 74
Test cases 6§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 5
Other tests reaching this symbol 1
Relations§
Instantiated in 1
Type checks 3
- instanceof SqlSemantics\Platform\PostgreSql\Lowering\Routine\OptionRule::options() packages/sql-semantics-postgres/src/Lowering/Routine/OptionRule.php:103
- instanceof SqlSemantics\Platform\PostgreSql\Rules\Routine\RoutineChecks::body() packages/sql-semantics-postgres/src/Rules/Routine/RoutineChecks.php:83
- instanceof SqlSemantics\Platform\PostgreSql\Statement\Routine\CreateFunction::__construct() packages/sql-semantics-postgres/src/Statement/Routine/CreateFunction.php:69