classHandlerScan
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.
$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 $handlerpublic ScanDirection $directionpublic Scalar|null $where = nullpublic Limit|null $limit = nullMethods§
public function __construct(
public OpenHandler $handler,
public ScanDirection $direction,
public Scalar|null $where = null,
public Limit|null $limit = null,
)Parameters
$handler | OpenHandler | The handler read from |
$direction | ScanDirection | Which row is read |
$where | Scalar|null | The condition rows must meet |
$limit | Limit|null | The most rows read |
public function deriveStatement(Derivation $derivation): voidDerives the handler, WHERE and LIMIT, and records the rows read.
Parameters
$derivation | Derivation |
Calls 2
- method-call HandlerFacts::read() line 45
- new HandlerFacts line 45
public function render(Output $out): voidWrites the statement.
Parameters
$out | Output |
Calls 2
- method-call Output::keyword() line 53
- method-call Output::node() line 57
Test cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
HandlerScanTestcalls