Method, system, and program for using a fetch request to make data available to an application program
AssigneeInternational Business Machines Corporation
InventorsYao Ching Stephen Chen, Kalpana Shyam, Julie Ann Watts
Life of this patent
Estimating the term…
Abstract
Provided is a method, system, program, and data structures for making data available to an application program. A result table is generated including rows corresponding to a subset of rows in a base table having data in one or more columns that satisfy a query predicate clause. The result table includes, for each row, a location identifier of the corresponding row in the base table and a column for each column in a query select list. The result table is accessed to return requested data from the base table to the application program.
Claims36
A method for making data available to an application program, comprising:
- generating a result table including rows corresponding to a subset of rows in a base table having data in one or more columns that satisfy a query predicate clause, wherein the result table includes, for each row, a location identifier of the corresponding row in the base table;
- maintaining a cursor row pointer that points to a current row in the result table;
- receiving a fetch request from the application program to reposition the cursor row pointer to a target row in the result table that is different than the current row and return the data at the target row to the application program;
- repositioning the cursor row pointer to point to the target row in the result table;
- determining whether a delete flag for the target row indicates whether the corresponding row in the base table was deleted, wherein the target row in the result table is no longer available to return in response to the fetch request if the delete flag indicates that the corresponding row in the base table was deleted;
- and
- returning a code to the application program in response to the fetch request indicating that the requested row in the result table is not available.
A system for making data available to an application program, comprising:
- a computer readable medium;
- a storage device;
- a base table stored in the storage device;
- means for generating a result table in the computer readable medium including rows corresponding to a subset of rows in a base table having data in one or more columns that satisfy a query predicate clause, wherein the result table includes, for each row, a location identifier of the corresponding row in the base table;
- means for maintaining a cursor row pointer that points to a current row in the result table in the computer readable medium;
- means for receiving a fetch request from the application program to reposition the cursor row pointer to a target row in the result table that is different than the current row and return the data at the target row to the application program;
- means for repositioning the cursor row pointer to point to the target row in the result table;
- means for determining whether a delete flag for the target row indicates whether the corresponding row in the base table was deleted, wherein the target row in the result table is no longer available to return in response to the fetch request if the delete flag indicates that the corresponding row in the base table was deleted;
- and
- means for returning a code to the application program in response to the fetch request indicating that the requested row in the result table is not available.
An article of manufacture including code for making data available to an application program by:
- generating a result table including rows corresponding to a subset of rows in a base table having data in one or more columns that satisfy a query predicate clause, wherein the result table includes, for each row, a location identifier of the corresponding row in the base table;
- maintaining a cursor row pointer that points to a current row in the result table;
- receiving a fetch request from the application program to reposition the cursor row pointer to a target row in the result table that is different than the current row and return the data at the target row to the application program;
- repositioning the cursor row pointer to point to the target row in the result table;
- determining whether a delete flag for the target row indicates whether the corresponding row in the base table was deleted, wherein the target row in the result table is no longer available to return in response to the fetch request if the delete flag indicates that the corresponding row in the base table was deleted;
- and
- returning a code to the application program in response to the fetch request indicating that the requested row in the result table is not available.
Dependencies are inferred from the claim text.