Query generation
First Claim
1. A method for generating queries for at least one of retrieving data that satisfy a conditional expression from a database and performing a calculation on at least part of the retrieved data, the method comprising:
- receiving, at one or more computer systems, a first query containing at least one first conditional expression;
determining, with one or more processors associated with the one or more computer systems, a first replaceable token and a second replaceable token in the first query;
retrieving, with the one or more processors associated with the one or more computer systems, a parameter definition for a first instance of a parameter corresponding to the first replaceable token in the first query from a pool of parameter definitions that exist outside of a report or query that includes the first query;
verifying that the at least one first conditional expression in the query references the parameter having the persistent parameter definition;
in response to the at least one first conditional expression referencing the parameter having the persistent parameter definition, obtaining user input for a first instance of the parameter and user input for a second instance of the parameter based on the persistent parameter definition, wherein obtaining user input comprises;
generating, with the one or more processors associated with the one or more computer systems, a first graphical user interface in response to processing the first query based on the parameter definition for the first instance of the parameter corresponding to the first replaceable token identified in the first query, the parameter definition including information configured to prompt users for information indicative of a conditional expression and a calculation, wherein the first graphical user interface is sent and displayed to a user as a prompt for first information indicative of a second conditional expression and a first calculation;
receiving first user input from a user, wherein the first user input comprises the second conditional expression and first calculation;
generating, with the one or more processors associated with the one or more computer systems, a second graphical user interface in response to processing the first query based on reusing the parameter definition for the second instance of the parameter corresponding to the second replaceable token identified in the first query, wherein the second graphical user interface is sent and displayed to a user as a prompt for second information indicative of a third conditional expression and a second calculation;
receiving second user input from a user, wherein the second user input comprises the third conditional expression and second calculation;
replacing the first replaceable token with the second conditional expression and the first calculation and replacing the second token with the third conditional expression and the second calculation;
in response to replacing the first replaceable token identified in the first query with the second conditional expression and the first calculation and the second replaceable token identified in the first query with the third conditional expression and the second calculation, performing generation of a second query for retrieving data that satisfy the at least one first conditional expression;
retrieving data that satisfies the at least one first conditional expression, wherein retrieving data that satisfies the at least one first conditional expression comprises evaluating the second conditional expression and the third conditional expression; and
performing the first calculation and the second calculation on the retrieved data.
1 Assignment
0 Petitions
Accused Products
Abstract
A query generator is operable to generate a query for retrieving data that satisfy a conditional expression from a database, and/or perform an arbitrary calculation on at least part of the retrieved data. The query generator can receive an input query and analyze the query to ascertain whether it contains a replaceable token. If the query contains a replaceable token, the query generator can replace that token with user input specifying a parameter of the conditional expression and/or the arbitrary calculation, thereby generating an output query for retrieving the data that satisfy the conditional expression and/or performing the arbitrary calculation on the retrieved data.
17 Citations
21 Claims
-
1. A method for generating queries for at least one of retrieving data that satisfy a conditional expression from a database and performing a calculation on at least part of the retrieved data, the method comprising:
-
receiving, at one or more computer systems, a first query containing at least one first conditional expression; determining, with one or more processors associated with the one or more computer systems, a first replaceable token and a second replaceable token in the first query; retrieving, with the one or more processors associated with the one or more computer systems, a parameter definition for a first instance of a parameter corresponding to the first replaceable token in the first query from a pool of parameter definitions that exist outside of a report or query that includes the first query; verifying that the at least one first conditional expression in the query references the parameter having the persistent parameter definition; in response to the at least one first conditional expression referencing the parameter having the persistent parameter definition, obtaining user input for a first instance of the parameter and user input for a second instance of the parameter based on the persistent parameter definition, wherein obtaining user input comprises; generating, with the one or more processors associated with the one or more computer systems, a first graphical user interface in response to processing the first query based on the parameter definition for the first instance of the parameter corresponding to the first replaceable token identified in the first query, the parameter definition including information configured to prompt users for information indicative of a conditional expression and a calculation, wherein the first graphical user interface is sent and displayed to a user as a prompt for first information indicative of a second conditional expression and a first calculation; receiving first user input from a user, wherein the first user input comprises the second conditional expression and first calculation; generating, with the one or more processors associated with the one or more computer systems, a second graphical user interface in response to processing the first query based on reusing the parameter definition for the second instance of the parameter corresponding to the second replaceable token identified in the first query, wherein the second graphical user interface is sent and displayed to a user as a prompt for second information indicative of a third conditional expression and a second calculation; receiving second user input from a user, wherein the second user input comprises the third conditional expression and second calculation;
replacing the first replaceable token with the second conditional expression and the first calculation and replacing the second token with the third conditional expression and the second calculation;in response to replacing the first replaceable token identified in the first query with the second conditional expression and the first calculation and the second replaceable token identified in the first query with the third conditional expression and the second calculation, performing generation of a second query for retrieving data that satisfy the at least one first conditional expression; retrieving data that satisfies the at least one first conditional expression, wherein retrieving data that satisfies the at least one first conditional expression comprises evaluating the second conditional expression and the third conditional expression; and performing the first calculation and the second calculation on the retrieved data. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A non-transitory computer-readable medium storing computer-executable code for generating queries for at least one of retrieving data that satisfy a conditional expression from a database and performing a calculation on at least part of the retrieved data, the non-transitory computer-readable medium comprising:
-
code for receiving a first query containing at least one first conditional expression; code for determining a first replaceable token and a second replaceable token in the first query; code for retrieving a parameter definition for a first instance of a parameter corresponding to the first replaceable token in the first query from a pool of parameter definitions that exist outside of a report or query that includes the first query; code for verifying that the at least one first conditional expression in the query references the parameter having the persistent parameter definition; in response to the at least one first conditional expression referencing the parameter having the persistent parameter definition, code for obtaining user input for a first instance of the parameter and user input for a second instance of the parameter based on the persistent parameter definition, wherein obtaining user input comprises; code for generating a first graphical user interface in response to processing the first query based on the parameter definition for the first instance of the parameter corresponding to the first replaceable token identified in the first query, the parameter definition including information configured to prompt users for information indicative of a conditional expression and a calculation, wherein the first graphical user interface is sent and displayed to a user as a prompt for first information indicative of a second conditional expression and a first calculation; code for receiving first user input from a user, wherein the first user input comprises the second conditional expression and first calculation; code for generating a second graphical user interface in response to processing the first query based on reusing the parameter definition for the second instance of the parameter corresponding to the second replaceable token identified in the first query, wherein the second graphical user interface is sent and displayed to a user as a prompt for second information indicative of a third conditional expression and a second calculation; code for receiving second user input from a user, wherein the second user input comprises the third conditional expression and second calculation; code for replacing the first replaceable token with the second conditional expression and the first calculation and replacing the second token with the third conditional expression and the second calculation; in response to replacing the first replaceable token identified in the first query with the second conditional expression and the first calculation and the second replaceable token identified in the first query with the third conditional expression and the second calculation, code for performing generation of a second query for retrieving data that satisfy the at least one first conditional expression; code for retrieving data that satisfies the at least one first conditional expression, wherein retrieving data that satisfies the at least one first conditional expression comprises evaluating the second conditional expression and the third conditional expression; and code for performing the first calculation and the second calculation on the retrieved data. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A system for generating queries for at least one of retrieving data that satisfy a conditional expression from a database and performing a calculation on at least part of the retrieved data, the system comprising:
-
a processor; and a memory in communication with the processor and configured to store a set of instructions which when executed by the processor configure the processor to; receive a first query containing at least one first conditional expression; determine a first replaceable token and a second replaceable token in the first query; retrieve a parameter definition for a first instance of a parameter corresponding to the first replaceable token in the first query from a pool of parameter definitions that exist outside of a report or query that includes the first query; verify that the at least one first conditional expression in the query references the parameter having the persistent parameter definition; in response to the at least one first conditional expression referencing the parameter having the persistent parameter definition, obtain user input for a first instance of the parameter and user input for a second instance of the parameter based on the persistent parameter definition, wherein obtaining user input comprises; generating a first graphical user interface in response to processing the first query based on the parameter definition for the first instance of the parameter corresponding to the first replaceable token identified in the first query, the parameter definition including information configured to prompt users for information indicative of a conditional expression and a calculation, wherein the first graphical user interface is sent and displayed to a user as a prompt for first information indicative of a second conditional expression and a first calculation; receiving first user input from a user, wherein the first user input comprises the second conditional expression and first calculation; generating a second graphical user interface in response to processing the first query based on reusing the parameter definition for the second instance of the parameter corresponding to the second replaceable token identified in the first query, wherein the second graphical user interface is sent and displayed to a user as a prompt for second information indicative of a third conditional expression and a second calculation; receiving second user input from a user, wherein the second user input comprises the third conditional expression and second calculation; replace the first replaceable token with the second conditional expression and the first calculation and replacing the second token with the third conditional expression and the second calculation; in response to replacing the first replaceable token identified in the first query with the second conditional expression and the first calculation and the second replaceable token identified in the first query with the third conditional expression and the second calculation, perform generation of a second query for retrieving data that satisfy the at least one first conditional expression; retrieve data that satisfies the at least one first conditional expression, wherein retrieving data that satisfies the at least one first conditional expression comprises evaluating the second conditional expression and the third conditional expression; and perform the first calculation and the second calculation on the retrieved data. - View Dependent Claims (16, 17, 18, 19, 20, 21)
-
Specification