classScript
final class Script
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.Several statements written as one input, each a request of its own.
Every statement is derived against the same context. An earlier statement is not executed for a later one: a CREATE in the script declares nothing for the statements after it. The declarations and diagnostics of every member are those of the script; the rows of a member are not, since a script has no single row set.
$script = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('SELECT 1; SELECT 2');
[count($script->statement->statements), $script->toString()] // => [2, 'SELECT 1; SELECT 2']Properties§
public list<Statement> $statementsMethods§
public function __construct(list<Statement> $statements)Parameters
$statements | list<Statement> | The statements in input order; not exactly one |
Calls 4
- static-call Check::listOf() line 39
- class-const Statement::class() line 39
- static-call Check::input() line 40
- function-call
countline 40
public function deriveStatement(Derivation $derivation): voidDerives each statement against the same unchanged context; the script itself returns no rows.
Parameters
$derivation | Derivation |
Calls 1
- method-call Derivation::member() line 52
public function render(Output $out): voidWrites the statements separated by terminators.
Parameters
$out | Output |
Calls 2
- method-call Output::symbol() line 63
- method-call Output::node() line 65