/usr/share/doc/firebird/sql.extensions
------------------ Scrollable cursors ------------------ Function: Allow to navigate through the open cursor in any direction rather than sequentially fetching records forward. Author: Dmitry Yemanov <dimitr@firebirdsql.org> Scope: PSQL, DSQL with additional API support Syntax rules (PSQL): // To declare a cursor: DECLARE <name> SCROLL CURSOR FOR ( <select expression> ) // To fetch forward: FETCH <cursor name> [INTO <var name> [, <var name> ...]]; // To fetch in any direction: FETCH {NEXT | PRIOR | FIRST | LAST | ABSOLUTE <n> | RELATIVE <n>} FROM <cursor name> [INTO <var name> [, <var name> ...]]; See also /doc/sql.extensions/README.cursors Usage with API: Result set must be opened with the flag IStatement::CURSOR_TYPE_SCROLLABLE explicitly specified. The following fetch methods of the IResultSet interface are available: int fetchNext(IStatus* status, void* message); // equal to FETCH NEXT FROM <cursor name> Moves the cursor's current position to the next row and return it. If cursor is empty or already positioned at the last row, NO_DATA condition is returned. int fetchPrior(IStatus* status, void* message); // equal to FETCH PRIOR FROM <cursor name> Moves the cursor's current position to the prior row and return it. If cursor is empty or already positioned at the first row, NO_DATA condition is returned. int fetchFirst(IStatus* status, void* message); // equal to FETCH FIRST FROM <cursor name> Moves the cursor's current position to the first row and return it. If cursor is empty, NO_DATA condition is returned. int fetchLast(IStatus* status, void* message); // equal to FETCH LAST FROM <cursor name> Moves the cursor's current position to the last row and return it. If cursor is empty, NO_DATA condition is returned. int fetchAbsolute(IStatus* status, int position, void* message); // equal to FETCH ABSOLUTE <position> FROM <cursor name> Moves the cursor's current position to the specified one and return the located row. If specified position is beyond the cursor's boundaries, NO_DATA condition is returned. int fetchRelative(IStatus* status, int offset, void* message); // equal to FETCH RELATIVE <offset> FROM <cursor name> Moves the cursor's current position backward or forward by the specified offset and return the located row. If calculated position is beyond the cursor's boundaries, NO_DATA condition is returned. Note(s): 1. When a scrolling option is ommitted, NO SCROLL is implied (ie. cursor is opened as forward-only). In PSQL, this means that only FETCH [NEXT FROM] commands can be used, other commands will return an error. For API users, this means that only fetchNext() API call can be used, other fetch methods will return an error. 2. Scrollable cursors are internally materialized as a temporary record set, thus consuming memory/disk resources, so this feature should be used only when really necessary.
.
Edit
..
Edit
README.PSQL_stack_trace.txt
Edit
README.aggregate_filter.md
Edit
README.aggregate_tracking
Edit
README.alternate_string_quoting.txt
Edit
README.autonomous_transactions.txt
Edit
README.blob_append.md
Edit
README.builtin_functions.txt
Edit
README.case
Edit
README.coalesce
Edit
README.column_type_psql.txt
Edit
README.common_table_expressions
Edit
README.context_variables
Edit
README.context_variables2
Edit
README.cumulative_roles.txt
Edit
README.current_time
Edit
README.cursor_variables.txt
Edit
README.cursors
Edit
README.data_type_results_of_aggregations.txt
Edit
README.data_types
Edit
README.db_triggers.txt
Edit
README.ddl.txt
Edit
README.ddl_access.txt
Edit
README.ddl_triggers.txt
Edit
README.default_parameters
Edit
README.derived_tables.txt
Edit
README.distinct
Edit
README.domains_psql.txt
Edit
README.exception_handling
Edit
README.execute_block
Edit
README.execute_statement
Edit
README.execute_statement2
Edit
README.explicit_locks
Edit
README.expression_indices
Edit
README.external_connections_pool
Edit
README.floating_point_types.md
Edit
README.global_temporary_tables
Edit
README.hex_literals.txt
Edit
README.identity_columns.txt
Edit
README.iif
Edit
README.isc_info_xxx
Edit
README.joins.txt
Edit
README.keywords
Edit
README.leave_labels
Edit
README.length
Edit
README.linger
Edit
README.list
Edit
README.management_statements_psql.md
Edit
README.mapping.html
Edit
README.merge.txt
Edit
README.null_value
Edit
README.nullif
Edit
README.offset_fetch.txt
Edit
README.order_by_expressions_nulls
Edit
README.packages.txt
Edit
README.plan
Edit
README.regr_functions.txt
Edit
README.returning
Edit
README.rows
Edit
README.savepoints
Edit
README.scrollable_cursors.txt
Edit
README.select_expressions
Edit
README.sequence_generators
Edit
README.set_bind.md
Edit
README.set_role
Edit
README.set_transaction.txt
Edit
README.similar_to.txt
Edit
README.sql_security.txt
Edit
README.statistical_functions.txt
Edit
README.subroutines.txt
Edit
README.substring_similar.txt
Edit
README.time_zone.md
Edit
README.trim
Edit
README.universal_triggers
Edit
README.update_or_insert
Edit
README.user_management
Edit
README.view_updates
Edit
README.window_functions.md
Edit