Result set output criteria
AssigneeInternational Business Machines Corporation
InventorsRafal P. Konik, Roger A. Mittelstadt, Brian R. Muras, Chad A. Olstad
Life of this patent
Estimating the term…
Abstract
A structured query language (SQL) query is configured to present a selected portion of a result set to a user interface. The selected portion of the result set can be based on an offset criteria appended to the SQL query. The offset criteria determines a location of a first presented instance of the selected portion of the result set. The offset criteria is configured to determine the location of the first presented instance of the selected portion of the result set independent of a number of instances appearing between a first instance of the result set and the first presented instance of the selected portion of the result set.
Claims20
A method comprising:
- modifying a structured query language (SQL) query to include an offset criteria comprising a first set of text;
- executing the modified SQL query such that a result set comprising a first number of instances is retrieved from a database;
- and
- outputting a portion of the result set to a user interface based on the offset criteria and in response to executing the modified SQL query;
- wherein the portion of the result set comprises an initial instance and a terminal instance and each respective instance of the result set located between the initial instance and the terminal instance;
- wherein the portion of the result set comprises a second number of instances being less than the first number of instances;
- and
- wherein the initial instance of the portion of the result set contains a set of text matching the first set of text of the offset criteria.
A system comprising:
- a user device;
- a memory storing a database therein;
- a processor communicatively coupled to the user device and the memory and configured to:
- receive, from the user device, a structured query language (SQL) query configured to retrieve a plurality of values from the database according to a selection criteria;
- receive an offset criteria comprising a first set of text from the user device;
- modify the SQL query to include the offset criteria in the SQL query by appending an OFFSET clause containing the offset criteria to the SQL query;
- execute the SQL query on the database and generate a result set;
- locate a first value in a first instance of the result set matching the first set of text;
- output, to the user device, a first portion of the result set comprising the first instance and each respective instance of the result set located between the first instance and a second instance located at the end of the first portion of the result set.
A computer program product comprising a computer readable storage medium having program instructions embodied therewith, wherein the computer readable storage medium is not a transitory signal per se, the program instructions executable by a processor to cause the processor to perform a method comprising:
- receiving a result set corresponding to a structured query language (SQL) query, wherein the result set comprises a plurality of instances, wherein each respective instance is associated with one or more respective values;
- defining a first portion of the result set to output to an interface based on the SQL query, wherein the first portion of the result set comprises a first initial instance, a first terminal instance, and each respective instance located between the first initial instance and the first terminal instance of the result set, wherein defining the first portion of the result set further comprises:
- identifying the first initial instance of the result set according to an offset criteria specified in an OFFSET clause of the SQL query, wherein the offset criteria is configured to identify the first initial instance independent of a number of instances appearing between a first instance of the result set and the first initial instance of the first portion of the result set;
- identifying the first terminal instance of the result set according to a fetch criteria specified in a FETCH clause of the SQL query;
- and
- outputting the first portion of the result set to the interface.
Dependencies are inferred from the claim text.