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.

Closing a cursordoctest
$close = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CLOSE c');
    $close->statement->cursor->value // => 'c'

Properties§

public Name|null $cursor

Methods§

public function __construct(public Name|null $cursor)

Parameters

$cursorName|nullThe cursor name; null for ALL
public function deriveStatement(Derivation $derivation): void

Derives nothing: cursors are session state.

Parameters

$derivationDerivation
public function render(Output $out): void

Writes the statement.

Parameters

$outOutput
Calls 3

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
Type declarations 1