final class OpenCursor
    implements ProgramStatement
    uses Snapshot
Public API: explicitly declared with @visibility public.

OPEN: opens a declared cursor.

The facts follow MYSQL-PROGRAM-CURSORS-001. Source: https://dev.mysql.com/doc/refman/8.4/en/open.html.

Reading the cursor an OPEN namesdoctest
(new \SqlSemantics\Platform\MySql\Semantics())->analyze('CREATE PROCEDURE p() OPEN c') // throws \SqlSemantics\Platform\MySql\Model\Diagnostic\SemanticException: Undefined CURSOR: c

Properties§

public Name $cursor

Methods§

public function __construct(public Name $cursor)

Parameters

$cursorNameThe cursor name
public function deriveProgram(Derivation $derivation, ProgramScope $scope): void

Checks that the cursor is declared.

Parameters

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

Writes the statement.

Parameters

$outOutput
Calls 2

Test cases 5§

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 4

Relations§

Instantiated in 1
Type declarations 1