classCloseCursor
final class CloseCursor
implements ProgramStatement
uses Snapshot
Public API: explicitly declared with
@visibility public.CLOSE: closes an open cursor.
The facts follow MYSQL-PROGRAM-CURSORS-001. Source: https://dev.mysql.com/doc/refman/8.4/en/close.html.
$create = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('CREATE PROCEDURE p() BEGIN DECLARE c CURSOR FOR SELECT 1; CLOSE c; END');
[$create->statement->body->statements[0]->cursor->value, $create->facts->diagnostics] // => ['c', []]Properties§
public Name $cursorMethods§
public function deriveProgram(Derivation $derivation, ProgramScope $scope): voidChecks that the cursor is declared.
Parameters
$derivation | Derivation | |
$scope | ProgramScope |
Calls 2
- method-call CursorFacts::cursor() line 43
- new CursorFacts line 43
public function render(Output $out): voidWrites the statement.
Parameters
$out | Output |
Calls 2
- method-call Output::keyword() line 51
- class-const NameUse::Identifier() line 51
Test cases 4§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.