final class Evaluation
    implements Statement
    uses Snapshot
Public API: explicitly declared with @visibility public.

DO: evaluates expressions and returns no rows.

Rule: MYSQL-DO-001. The expressions are derived as a select list without input relations (MYSQL-PROJECTION-001), so a star is reported as a star without tables; MySQL 5.7 and later accept select items with aliases, MySQL 5.6 an expression list. The statement returns no rows. Terminates: one pass over the items. Source: https://dev.mysql.com/doc/refman/8.4/en/do.html. Status: Implemented.

Reading the expressions of DOdoctest
$do = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('DO SLEEP(1), @a := 2');
    [count($do->statement->items), $do->facts->output, $do->toString()] // => [2, null, 'DO SLEEP(1), @a := 2']

Properties§

Methods§

public function __construct(list<SelectExpression|Star|TableWildcard> $items)

Parameters

$itemslist<SelectExpression|Star|TableWildcard>The items; at least one

Throws

InvalidConstruction When there is no item, or an item is of no select item class
Calls 3
public function deriveStatement(Derivation $derivation): void

Derives the items where no relation is visible; the statement returns no rows.

Parameters

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

Writes the statement.

Parameters

$outOutput
Calls 1

Test cases 2§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 2

Relations§

Instantiated in 3
Type declarations 1