classAtomicBody
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.
count((new \SqlSemantics\Platform\PostgreSql\Statement\Routine\AtomicBody([]))->statements) // => 0Properties§
public list<Statement|ReturnStatement> $statementsMethods§
public function __construct(list<Node> $statements)Parameters
$statements | list<Node> | The statements in order: statements and RETURN statements |
Throws
InvalidConstruction When an item is neither a statement nor a RETURN statementCalls 3
- static-call Check::listOf() line 47
- class-const Node::class() line 47
- new InvalidConstruction line 49
public function deriveClause(Derivation $derivation, Environment $environment): voidDerives every statement with the parameters visible.
Parameters
$derivation | Derivation | |
$environment | Environment |
Test cases 1
Calls 2
- method-call BodyFacts::derive() line 61
- new BodyFacts line 61
public function render(Output $out): voidWrites BEGIN ATOMIC, each statement followed by a semicolon, and END.
Parameters
$out | Output |
Test cases 1
Calls 2
- method-call Output::keyword() line 69
- method-call Output::node() line 71
Test cases 5§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.