Method and apparatus for generating database queries from a meta-query pattern
First Claim
1. Computer interpretable grammatical rules for generating a plurality of queries in a grammar for testing a database engine driver, said grammatical rules comprising:
- static elements for generating constant portions of said plurality of queries, wherein said static elements are copied to a buffer associated with a computer to generate said plurality of queries from said grammatical rules; and
variable elements selected from at least one of a group consisting of;
a query element and a query list element, for generating database engine driver specific portions of said plurality of queries, wherein said variable elements are replaced in said buffer by values specific to a particular database engine driver to generate said plurality of queries from said, grammatical rules.
2 Assignments
0 Petitions
Accused Products
Abstract
A grammar, parsing method, and associated apparatus for automatically generating test commands to test an SQL database engine interface while reducing storage requirements and improving access time for such test commands as compared with prior test tools. The test tools and methods include a grammar for concise syntactic representation of a meta-query (also referred to as meta-language statement, query pattern, or query template). The meta-query defines an statement similar to the SQL language but includes query elements and query list elements used to generate a plurality of SQL test commands to be applied to the SQL database engine under test. Test commands are generated from the meta-query to reduce storage requirements of prior test methods. Query elements are variable space holders in the meta-query and are replaced by a value appropriate to the SQL database engine under test when the meta-query is used to generate test commands. Query list elements define a list of values to be inserted in place of the query list element when generating the test commands from the meta-query.
141 Citations
9 Claims
-
1. Computer interpretable grammatical rules for generating a plurality of queries in a grammar for testing a database engine driver, said grammatical rules comprising:
-
static elements for generating constant portions of said plurality of queries, wherein said static elements are copied to a buffer associated with a computer to generate said plurality of queries from said grammatical rules; and variable elements selected from at least one of a group consisting of;
a query element and a query list element, for generating database engine driver specific portions of said plurality of queries, wherein said variable elements are replaced in said buffer by values specific to a particular database engine driver to generate said plurality of queries from said, grammatical rules. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A computer operable method for testing a database driver, said method comprising:
-
parsing a meta-language statement into at least one meta-language statement token each comprised of at least one token element where any one of said at least one meta-language statement token that is comprised of more than one token element is a variable token element delimited by a pair of variable token element delimiters and said variable token element is a type selected from at least one of a group consisting of;
a query element and a query list element;expanding said meta-language statement into a plurality of meta-language test queries comprised of one of said plurality of meta-language test queries for each unique combination of said at least one token element in each of said at least one meta-language statement token; generating a plurality of data type specific test queries from said plurality of meta-language test queries by direct substitution of a data type specific database driver query element for each substitutable one of said at least one token element in each of said plurality of meta-language test queries; repeating said step of generating for each data type supported by said database driver; and applying said plurality of data type specific test queries to said database driver. - View Dependent Claims (7, 8)
-
-
9. A rule-based test apparatus for generating a plurality of test commands to test a database engine driver, said apparatus comprising:
-
a memory; a processor connected to said memory; a plurality of rules, stored in said memory, wherein each of said plurality of rules is encoded in a meta-language syntax used to represent a plurality of test commands that are executable on corresponding ones of a plurality of database engine drivers; and processing means, operable in said processor, for parsing a meta-language statement input and for generating each of said plurality of test commands according to said plurality of rules and for applying each of said plurality of test commands to said database engine driver.
-
Specification