final class IntoVariables
    implements IntoDestination
    uses Snapshot
Public API: explicitly declared with @visibility public.

INTO var, ...: the user variables and stored program variables that receive the columns of the one result row.

The query that holds the destination derives the targets and reports a count that differs from the number of columns. Source: https://dev.mysql.com/doc/refman/8.4/en/select-into.html.

Reading the targetsdoctest
$query = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('SELECT a, b FROM t INTO @x, y');
    [$query->statement->into->targets[0]->name->value, $query->statement->into->targets[1]->name->value] // => ['x', 'y']

Properties§

public non-empty-list<UserVariable|ProgramVariable> $targets

Methods§

public function __construct(list<Scalar> $targets)

Parameters

$targetslist<Scalar>The targets in written order, each a user or stored program variable; at least one
Calls 3
public function render(Output $out): void

Writes the targets.

Parameters

$outOutput
Calls 1

Test cases 7§

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

Dedicated tests 3
Other tests reaching this symbol 4

Relations§

Instantiated in 1
Type checks 1
Type declarations 1