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.
$semantics = new \SqlSemantics\Platform\MySql\Semantics();
$operations = $semantics->analyzeAll('SELECT 1; SELECT 2');
$script = new \SqlSemantics\Platform\MySql\Model\Statement\Script([$operations[0]->statement, $operations[1]->statement]);
count($script->statements) // => 2Properties§
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 41
- class-const Statement::class() line 41
- static-call Check::input() line 42
- function-call
countline 42
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 54
public function render(Output $out): voidWrites the statements separated by terminators.
Parameters
$out | Output |
Calls 2
- method-call Output::symbol() line 65
- method-call Output::node() line 67