final class ExternalBody
    implements Node
    uses Snapshot
Public API: explicitly declared with @visibility public.

The body of a stored routine written in an external language: AS and the code as a string (MySQL 8.1 and later).

The code is opaque text to the server's SQL layer; nothing is derived from it. Source: https://dev.mysql.com/doc/refman/9.1/en/create-procedure.html.

Reading the code of an external bodydoctest
$create = (new \SqlSemantics\Platform\MySql\Semantics('mysql-9.1.0'))->analyze('CREATE FUNCTION f() RETURNS INT LANGUAGE JAVASCRIPT AS $$ return 1 $$');
    $create->statement->body->code->text // => ' return 1 '

Properties§

Methods§

public function __construct(public DollarQuotedText|Text $code)

Parameters

$codeDollarQuotedText|TextThe code, written as a dollar-quoted or a quoted string
Calls 1
public function render(Output $out): void

Writes AS and the code.

Parameters

$outOutput
Test cases 1
Calls 1

Test cases 10§

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

Dedicated tests 3
Other tests reaching this symbol 7

Relations§

Instantiated in 1
Type checks 2
Type declarations 5