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.

Keeping the statements of one input apartdoctest
$script = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('SELECT 1; SELECT 2');
    [count($script->statement->statements), $script->toString()] // => [2, 'SELECT 1; SELECT 2']

Properties§

public list<Statement> $statements

Methods§

public function __construct(list<Statement> $statements)

Parameters

$statementslist<Statement>The statements in input order; not exactly one
Calls 4
public function deriveStatement(Derivation $derivation): void

Derives each statement against the same unchanged context; the script itself returns no rows.

Parameters

$derivationDerivation
Calls 1
public function render(Output $out): void

Writes the statements separated by terminators.

Parameters

$outOutput
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 4
Other tests reaching this symbol 1

Relations§

Instantiated in 1