enumFetchMovement
enum FetchMovement
Public API: explicitly declared with
@visibility public.Where FETCH or MOVE positions the cursor, as written.
Mirrors the direction and howMany of PostgreSQL's FetchStmt: NEXT and a missing direction are FORWARD 1, PRIOR is BACKWARD 1, FIRST is ABSOLUTE 1, LAST is ABSOLUTE -1, a count alone is FORWARD count and ALL is FORWARD ALL. The spellings are kept because they are different requests of the grammar. The counted movements take a count. Source: https://www.postgresql.org/docs/17/sql-fetch.html.
$fetch = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('FETCH BACKWARD 5 FROM c');
[$fetch->statement->movement, $fetch->statement->count->magnitude->digits] // => [\SqlSemantics\Platform\PostgreSql\Statement\Manipulation\Cursor\FetchMovement::BackwardCount, '5']Cases§
case Implicitcase Nextcase Priorcase Firstcase Lastcase Absolutecase Relativecase Countcase Allcase Forwardcase ForwardCountcase ForwardAllcase Backwardcase BackwardCountcase BackwardAllMethods§
public function counted(): boolTells whether the movement takes a count.
Returns
boolCalled from 1
Calls 6
- function-call
in_arrayline 47 - class-const FetchMovement::Absolute() line 47
- class-const FetchMovement::Relative() line 47
- class-const FetchMovement::Count() line 47
- class-const FetchMovement::ForwardCount() line 47
- class-const FetchMovement::BackwardCount() line 47
public function write(Output $out): voidWrites the keywords before the count.
Parameters
$out | Output |
Called from 1
Calls 16
- class-const FetchMovement::Implicit() line 56
- class-const FetchMovement::Count() line 56
- class-const FetchMovement::Next() line 57
- class-const FetchMovement::Prior() line 58
- class-const FetchMovement::First() line 59
- class-const FetchMovement::Last() line 60
- class-const FetchMovement::Absolute() line 61
- class-const FetchMovement::Relative() line 62
- class-const FetchMovement::All() line 63
- class-const FetchMovement::Forward() line 64
- class-const FetchMovement::ForwardCount() line 64
- class-const FetchMovement::ForwardAll() line 65
- class-const FetchMovement::Backward() line 66
- class-const FetchMovement::BackwardCount() line 66
- class-const FetchMovement::BackwardAll() line 67
- method-call Output::keyword() line 70
Test cases 2§
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 1
Relations§
Method calls 2
- method-call SqlSemantics\Platform\PostgreSql\Statement\Manipulation\Cursor\Fetch::__construct() packages/sql-semantics-postgres/src/Statement/Manipulation/Cursor/Fetch.php:51
- method-call SqlSemantics\Platform\PostgreSql\Statement\Manipulation\Cursor\Fetch::render() packages/sql-semantics-postgres/src/Statement/Manipulation/Cursor/Fetch.php:71
Constant reads 16
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CursorRule packages/sql-semantics-postgres/src/Lowering/Manipulation/CursorRule.php:48
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CursorRule packages/sql-semantics-postgres/src/Lowering/Manipulation/CursorRule.php:49
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CursorRule packages/sql-semantics-postgres/src/Lowering/Manipulation/CursorRule.php:50
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CursorRule packages/sql-semantics-postgres/src/Lowering/Manipulation/CursorRule.php:51
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CursorRule packages/sql-semantics-postgres/src/Lowering/Manipulation/CursorRule.php:52
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CursorRule packages/sql-semantics-postgres/src/Lowering/Manipulation/CursorRule.php:53
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CursorRule packages/sql-semantics-postgres/src/Lowering/Manipulation/CursorRule.php:54
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CursorRule packages/sql-semantics-postgres/src/Lowering/Manipulation/CursorRule.php:55
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CursorRule packages/sql-semantics-postgres/src/Lowering/Manipulation/CursorRule.php:56
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CursorRule packages/sql-semantics-postgres/src/Lowering/Manipulation/CursorRule.php:57
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CursorRule packages/sql-semantics-postgres/src/Lowering/Manipulation/CursorRule.php:58
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CursorRule packages/sql-semantics-postgres/src/Lowering/Manipulation/CursorRule.php:59
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CursorRule packages/sql-semantics-postgres/src/Lowering/Manipulation/CursorRule.php:60
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CursorRule packages/sql-semantics-postgres/src/Lowering/Manipulation/CursorRule.php:61
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CursorRule packages/sql-semantics-postgres/src/Lowering/Manipulation/CursorRule.php:62
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CursorRule packages/sql-semantics-postgres/src/Lowering/Manipulation/CursorRule.php:63