classClose
final class Close
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.CLOSE: one open cursor, or all of them, closed.
Mirrors PostgreSQL's ClosePortalStmt, whose name is NULL for ALL. Rule: PG-CLOSE-001: cursors are session state; nothing is derived. Source: https://www.postgresql.org/docs/17/sql-close.html. Status: Implemented.
$close = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CLOSE c');
$close->statement->cursor->value // => 'c'Properties§
public Name|null $cursorMethods§
public function __construct(public Name|null $cursor)Parameters
$cursor | Name|null | The cursor name; null for ALL |
public function deriveStatement(Derivation $derivation): voidDerives nothing: cursors are session state.
Parameters
$derivation | Derivation |
public function render(Output $out): voidWrites the statement.
Parameters
$out | Output |
Calls 3
- method-call Output::keyword() line 49
- method-call Output::name() line 55
- class-const NameUse::Column() line 55
Test cases 3§
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 2
Relations§
Instantiated in 2
- new SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CursorRule::close() packages/sql-semantics-postgres/src/Lowering/Manipulation/CursorRule.php:164
- new SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CursorRule::close() packages/sql-semantics-postgres/src/Lowering/Manipulation/CursorRule.php:165