final class AtomicBody
    implements Clause
    uses Snapshot
Public API: explicitly declared with @visibility public.

BEGIN ATOMIC statement; ... END: an SQL-standard routine body of several statements.

The statements are parsed and checked when the routine is created, and they see the parameters. Empty statements between the semicolons request nothing and are not kept, as the server discards them. Source: https://www.postgresql.org/docs/17/sql-createfunction.html.

Counting the statements of an empty blockdoctest
count((new \SqlSemantics\Platform\PostgreSql\Statement\Routine\AtomicBody([]))->statements) // => 0

Properties§

public list<Statement|ReturnStatement> $statements

Methods§

public function __construct(list<Node> $statements)

Parameters

$statementslist<Node>The statements in order: statements and RETURN statements

Throws

InvalidConstruction When an item is neither a statement nor a RETURN statement
Calls 3
public function deriveClause(Derivation $derivation, Environment $environment): void

Derives every statement with the parameters visible.

Parameters

$derivationDerivation
$environmentEnvironment
Test cases 1
Calls 2
public function render(Output $out): void

Writes BEGIN ATOMIC, each statement followed by a semicolon, and END.

Parameters

$outOutput
Test cases 1
Calls 2

Test cases 5§

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 2

Relations§

Instantiated in 1
Type declarations 2