final class CursorRule
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.

Lowers DECLARE, FETCH, MOVE and CLOSE.

Rule: PG-CURSOR-LOWER-001. Scope: DeclareCursorStmt, cursor_options, opt_hold, FetchStmt, fetch_args, from_in, opt_from_in, ClosePortalStmt. Constructors: DeclareCursor with CursorOption and Holdability, Fetch with FetchMovement, Close. FROM and IN before the cursor name are noise words. Termination: the option list is walked down its spine in a loop. Source: https://www.postgresql.org/docs/17/sql-declare.html, https://www.postgresql.org/docs/17/sql-fetch.html, https://www.postgresql.org/docs/17/sql-close.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe hub
public function options(Node $options): list<CursorOption>

Lowers cursor_options.

Parameters

$optionsNode

Returns

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 3

Private surface 3§

Implementation details, listed for orientation only.

private const OPTIONS = ['cursor_options: cursor_options NO SCROLL' => \SqlSemantics\Platform\PostgreSq…
private const MOVEMENTS = ['fetch_args: cursor_name' => [\SqlSemantics\Platform\PostgreSql\Statement\Mani…
private Lowering $lowering

Test cases 1§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1

Relations§

Instantiated in 3
Method calls 3