classOpenHandler
final class OpenHandler
implements Relation
uses Snapshot
Public API: explicitly declared with
@visibility public.The open handler a HANDLER ... READ reads from, named by the alias or table name of its HANDLER ... OPEN.
Rule: MYSQL-HANDLER-TABLE-001. A handler is opened by an earlier statement of the session; which table it reads is session state, so its row shape is open and depends on that state. The WHERE condition of the read sees the handler under its name. Terminates: no child. Source: https://dev.mysql.com/doc/refman/8.4/en/handler.html. Status: Implemented.
$read = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('HANDLER h READ FIRST');
$read->statement->handler->name->value // => 'h'Properties§
public Name $nameMethods§
public function deriveRelation(Derivation $derivation, Environment $environment): RelationFactDerives the open row shape of the handler.
Parameters
$derivation | Derivation | |
$environment | Environment |
Returns
Calls 3
- new RelationFact line 48
- new RowShape line 48
- new SessionState line 48
public function render(Output $out): voidWrites the handler name.
Parameters
$out | Output |
Test cases 1
Calls 2
- method-call Output::name() line 56
- class-const NameUse::Relation() line 56
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
Type declarations 5
- type SqlSemantics\Platform\MySql\Lowering\Dml\HandlerRule packages/sql-semantics-mysql/src/Lowering/Dml/HandlerRule.php:132
- type SqlSemantics\Platform\MySql\Rules\Dml\HandlerFacts packages/sql-semantics-mysql/src/Rules/Dml/HandlerFacts.php:36
- type SqlSemantics\Platform\MySql\Statement\Dml\Handler\HandlerIndexRead packages/sql-semantics-mysql/src/Statement/Dml/Handler/HandlerIndexRead.php:39
- type SqlSemantics\Platform\MySql\Statement\Dml\Handler\HandlerIndexSeek packages/sql-semantics-mysql/src/Statement/Dml/Handler/HandlerIndexSeek.php:48
- type SqlSemantics\Platform\MySql\Statement\Dml\Handler\HandlerScan packages/sql-semantics-mysql/src/Statement/Dml/Handler/HandlerScan.php:36