classCurrentOf
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.
$delete = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('DELETE FROM t WHERE CURRENT OF c');
$delete->statement->where->cursor->value // => 'c'Properties§
public Name $cursorMethods§
public function deriveClause(Derivation $derivation, Environment $environment): voidDerives nothing: the cursor is session state.
Parameters
$derivation | Derivation | |
$environment | Environment |
public function render(Output $out): voidWrites CURRENT OF and the cursor name.
Parameters
$out | Output |
Calls 2
- method-call Output::keyword() line 50
- class-const NameUse::Column() line 50
Test cases 3§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
CurrentOfTestcalls
Other tests reaching this symbol 2
Relations§
Instantiated in 1
Type checks 1
Type declarations 4
- type SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\ChangeRule packages/sql-semantics-postgres/src/Lowering/Manipulation/ChangeRule.php:178
- type SqlSemantics\Platform\PostgreSql\Rules\Manipulation\ChangeFacts packages/sql-semantics-postgres/src/Rules/Manipulation/ChangeFacts.php:63
- type SqlSemantics\Platform\PostgreSql\Statement\Manipulation\Delete packages/sql-semantics-postgres/src/Statement/Manipulation/Delete.php:55
- type SqlSemantics\Platform\PostgreSql\Statement\Manipulation\Update packages/sql-semantics-postgres/src/Statement/Manipulation/Update.php:68