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

HANDLER ... READ FIRST|NEXT: reads rows of an open handler in natural row order.

The facts follow MYSQL-HANDLER-READ-001. Source: https://dev.mysql.com/doc/refman/8.4/en/handler.html.

Reading a scan of a handlerdoctest
$read = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('HANDLER h READ NEXT WHERE a > 1 LIMIT 5');
    [$read->statement->direction, $read->toString()] // => [\SqlSemantics\Platform\MySql\Statement\Dml\Handler\ScanDirection::Next, 'HANDLER h READ NEXT WHERE a > 1 LIMIT 5']

Properties§

public OpenHandler $handler
public ScanDirection $direction
public Scalar|null $where = null
public Limit|null $limit = null

Methods§

public function __construct(
    public OpenHandler $handler,
    public ScanDirection $direction,
    public Scalar|null $where = null,
    public Limit|null $limit = null,
)

Parameters

$handlerOpenHandlerThe handler read from
$directionScanDirectionWhich row is read
$whereScalar|nullThe condition rows must meet
$limitLimit|nullThe most rows read
public function deriveStatement(Derivation $derivation): void

Derives the handler, WHERE and LIMIT, and records the rows read.

Parameters

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

Writes the statement.

Parameters

$outOutput
Calls 2

Test cases 2§

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

Dedicated tests 1
Other tests reaching this symbol 1

Relations§

Instantiated in 1