final class CurrentOf
    implements Clause
    uses Snapshot
Public API: explicitly declared with @visibility public.

WHERE CURRENT OF cursor: the row a cursor is positioned on, as the only row an UPDATE or DELETE changes.

Mirrors PostgreSQL's CurrentOfExpr. The cursor is session state, so nothing is resolved here. Source: https://www.postgresql.org/docs/17/sql-update.html, https://www.postgresql.org/docs/17/sql-declare.html.

Reading the cursor of a positioned DELETEdoctest
$delete = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('DELETE FROM t WHERE CURRENT OF c');
    $delete->statement->where->cursor->value // => 'c'

Properties§

public Name $cursor

Methods§

public function __construct(public Name $cursor)

Parameters

$cursorNameThe cursor name
public function deriveClause(Derivation $derivation, Environment $environment): void

Derives nothing: the cursor is session state.

Parameters

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

Writes CURRENT OF and the cursor name.

Parameters

$outOutput
Calls 2

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