Summary of the invention
The object of this invention is to provide a kind of generating apparatus of query page, can inquire about for different target datas and different query demands, when changing appears in query demand, only need to reconfigure query statement, or input new querying condition can complete inquiry according to the query page generated, do not need to carry out complicated coding change, reach the object of software reuse.
The technical solution used in the present invention is as follows:
A kind of query page generating device, described device comprises:
Data capture unit, for obtaining store name information and the memory word segment information of target data;
Query object storage unit, for according to pre-set query object storage organization, is stored respectively by the store name information of the described target data obtained by described data capture unit and memory word segment information;
Condition dispensing unit, for according to actual queries demand, the field information of described query object cell stores is configured to respectively inquiry field and condition field, and the query logic of configuration condition interfield, form complete querying condition, can be configured to query interface in described condition field, the content identified described by this condition field can be changed;
Instance storage element, by the querying condition of described condition dispensing unit configuration, preserves into query case according to the sequence of positions of configuration in pre-set query case storage organization;
Query page generation unit, for being configured to the condition field generated query page of query interface in the query case that stores according to described instance storage element.
The described occurrence being configured to the condition field of query interface, identifies with wild symbol when storing.
Preferably, described device also comprises:
Human-computer interaction interface, for making described data capture unit by described human-computer interaction interface typing, the store name information importing described target data and target data and memory word segment information, configure described inquiry field, condition field and query logic, querying condition according to configuring is inquired about, and present described query page generation unit generate query page for inquire about.
Further, described query object storage unit specifically comprises:
Object oriented memory module, claims and/or view name for all table names storing the storage target data that described data capture unit obtains;
Object field memory module, for storing the literary name name section of storage target data that described data capture unit obtains, attribute information and/or view field name, attribute information;
Described object oriented memory module and described object field memory module are claimed by table name and/or view name associates.
Concrete, described instance storage element comprises further:
Example information memory module, is stored as query case for the querying condition configured by described condition dispensing unit, and preserves title and the attribute information of described query case;
Instance field memory module, for storing the field attribute information of query case that described example information memory module stores, comprising field name, whether this field be inquiry field, whether this field be condition field, for being set to the condition field allocation position numbering of query interface.
Preferably, the query case that described query page generation unit stores according to described example information memory module, obtains all condition fields being set to query interface in this query case, according to the condition field obtained, and the generated query page.
Preferably, described device also comprises:
Query case release unit, the query case for being stored by described instance storage element is distributed to other users.
The invention also discloses a kind of query page generation method, described method comprises:
Obtain store name information and the memory word segment information of target data;
According to pre-set query object storage organization, the target data store name information of described acquisition and memory word segment information are stored respectively;
According to actual queries demand, the target data field of described storage is configured to respectively inquiry field and condition field, and the querying condition that the query logic of configuration condition interfield has formed, described condition field can be configured to query interface;
The querying condition of described configuration is saved as query case according to the sequence of positions of configuration in pre-set query case storage organization;
According to the condition field generated query page being configured to query interface in described query case.
Preferably,
Described condition field can be configured to query interface, identifies with wild symbol when storing.
Preferably, described method also comprises
By human-computer interaction interface typing, the store name information importing target data and memory word segment information, configure described inquiry field, condition field and query logic, querying condition according to configuring is inquired about, and presents the query page of described generation and inquires about according to the query page generated.
Further,
The target data store name information of described storage is storage list title and/or the view name of target data;
The target data memory word segment information of described storage is the memory word name section of target data, attribute information and/or view field name, attribute information.
Further,
The querying condition that described configuration completes is stored as query case, and preserves title and the attribute information of described query case;
Whether preserve the field attribute information of described query case, comprising field name, this field is inquiry field, and whether this field is condition field, whether this condition field is query interface, for being set to the condition field allocation position numbering of query interface.
Further,
According to the field information of described query case, obtain the condition field being set to query interface in described query case, according to the condition field obtained, the generated query page.
The invention also discloses a kind of using method of query page generating device, described method comprises:
Select list table and/or the view name of the storage target data needing inquiry;
According to list table and/or the view name of described selection, obtain its field name comprised and the querying condition formed according to the query logic of actual queries demand configuration querying field respectively, condition field and interfield, described condition field can be configured to query interface;
Occurrence according to inputting each field in the querying condition configured completes inquiry; Or, described querying condition is saved as query case, according to the query interface generated query page comprised in query case, in query page, inputs each field occurrence complete inquiry.
Preferably, described method also comprises:
The query case of described preservation is issued.
The invention also discloses a kind of query page generating device that uses and carry out the method for inquiring about, described method comprises:
According to query demand configuration querying condition in query page generating device, preserve query case, the generated query page, the occurrence inputting each field in query page completes inquiry;
Or select the query page meeting query demand in the query page generated, the occurrence inputting each field in query page completes inquiry.
The present invention only needs table or the view of any storage target data that user is paid close attention to, be linked in this device by the mode of importing, typing, by pre-entering the query case determined, complete acquisition target data, and query manipulation can be carried out according to query demand to the data of all accesses, overcome query software that in prior art, one is developed according to demand and can only write query statement for certain specific target data and carry out the defect of inquiring about; By target matrix/view and the field name of acquisition, user according to actual queries demand flexible configuration querying condition, can realize the different query demands of user for different target data; Query interface is set to by the condition field can changing key word of the inquiry, querying condition is saved as query case, according to the query case generated query page, user inputs different key words according to query demand in the query page generated, according to the query case preserved, the inquiry of different key word can be completed; Query demand as user is changed, and only need reconfigure querying condition and generate new query page, revises flexible and need not carry out a large amount of R&D works for new demand; By to the issue of preserving query case, achieve sharing of query case, user according to oneself available inquiry of query case screening of issuing, can further increase the extent for multiplexing to query manipulation.
Embodiment
In order to enable those skilled in the art person understand the present invention program better, below in conjunction with drawings and embodiments, the present invention is described in further detail.
With reference to Fig. 1, it is the structural representation of a kind of query page generating device embodiment one of the present invention.
Data capture unit 11, for obtaining store name information and the memory word segment information of target data.
For various target data, all store in the mode of single table or view at present, therefore data capture unit obtains the method for data can be directly import the list table or view that store target data, obtain each field information in table/view name information and table/view, wherein the information of each field comprises field name, field type etc.
Query object storage unit 12, for according to pre-set query object storage organization, is stored respectively by the store name information of the described target data obtained by described data capture unit and memory word segment information.
The store name information of the target data obtained by data capture unit stores, and stores by the list table of all storage target datas or the title of view;
The memory word segment information of the target data obtained by data capture unit stores, field information by all fields comprised in each single table or view stores, field information comprises field name, field type, field represent type etc., as needs store other attributes, also store according to the actual requirements;
And preservation list shows or the storage organization of view name associates, to determine to find the list table corresponding with this field information or view by major key with the major key of setting for the storage organization of preservation field information.
Condition dispensing unit 13, for according to actual queries demand, the target data field information of described query object cell stores is configured to respectively inquiry field and the condition field of query statement, and the query logic of configuration condition interfield, form complete querying condition, described condition field can be configured to query interface, and the content identified described by this condition field can be changed.
Preferably, be configured to the value of the condition field of query interface, store time can identify by asterisk wildcard, with represent its can for setting arbitrary value, asterisk wildcard can be "? ", " * ", " # ", the arbitrary symbol such as " & ".
The different querying condition that query demand and user need the Query Result of acquisition according to it and arrange, be made up of query aim data, querying condition data and query logic, when the field information of query object cell stores is configured to inquiry field, this field is query aim data, namely inquires about all data in this field; When the field information of query object cell stores is configured to condition field, this field is querying condition data, namely inquires about using this field as condition; Query logic generally comprises the operation rule that "AND", "or", " equaling ", " being greater than ", " being less than ", " being not equal to ", " being not more than ", " being not less than " etc. indicate, with the order of operation specified by bracket, further in order to make the result of inquiry more comprehensive, the arithmetic logic of fuzzy query can also be introduced, the number percent of given query result and querying condition coupling.
The mode of configuration querying condition can adopt the mode of configuration interface, namely on interface, present the table/view of query object cell stores, and the field information comprised in each table, by the mode configuration querying condition selected, also the mode of writing query statement can be selected, directly by describing mode configuration querying conditions such as SQL query statements.The form of query SQL is " SELECT query contents FROM table name WHERE querying condition ".
For the mode configuration querying condition of configuration interface, as shown in Figure 2, list table name in query object storage unit in query composition condition box and be called all field names comprised in the list table of " order ", be the field as query aim data that user selects in inquiry row frame, be specially " group's single time " and " application time "; Logic selection area lists alternative all arithmetic logics; The field as querying condition data that user selects and the arithmetic logic selected in condition row frame.
Can repeatedly be used flexibly to make the querying condition of configuration, query interface can be set to for the field as querying condition data, can change according to actual queries demand with the occurrence identifying this querying condition, when condition field " Pai Dan department " and " request slip quantity " are set to query interface, querying condition just becomes " (Pai Dan department=?) and (request slip quantity > ?) ", then SQL query condition is:
SELECT group single time, application time FROMtableorderWHERE (Pai Dan department=?) and (request slip quantity >?), the content that question mark is arranged can be replaced arbitrarily, " group's single time " and " application time " of other Pai Dan departments and other request slip quantity can be inquired about
When being specially " (Pai Dan department=Ministry of Construction) and (request slip quantity >10) " of specified requirements field, the implication of this querying condition configured is, searches work order " group's single time " and " application time " that department is greater than 10 for " Ministry of Construction " and " request slip quantity " in table order.
For the mode configuration querying condition of SQL, then SQL query condition is:
Select group single time, application time fromtableorderwhere (Pai Dan department=Ministry of Construction) and (request slip quantity >10), certainly in actual storage process, the single field such as time, application time of group in SQL query condition, all preserves and input with the English name of correspondence.
Instance storage element 14, by the querying condition of described condition dispensing unit configuration, preserves into query case according to the sequence of positions of configuration in pre-set query case storage organization, and gives Position Number respectively for the condition field being set to query interface.
The querying condition configured is saved as query case, is convenient to give occurrence according to query demand to the condition field being set to query interface in same queries condition, ensures that this querying condition is reused, and do not need to reconfigure.
It is a query case that each querying condition configured is saved, and according to arranging inquiry field during configuration querying condition and the order of condition field is preserved, and gives Position Number respectively for the condition field being set to query interface.
Query case storage organization for store all query cases, this query case for target data store single table or view name, querying condition that query case is corresponding, and field name involved by each query case and field attribute information, comprise whether this field is inquiry field, whether this field is condition field etc., and store separately the relevant information being set to the condition field of query interface, also can preserve according to the actual requirements if need to store other information.
Query page generation unit 15, for being configured to the condition field generated query page of query interface in the query case that stores according to described instance storage element.
Be configured to the condition field of query interface in query case, different querying conditions can be obtained by the different occurrences of query interface, reach the object of multiplexing querying condition.Therefore user can input arbitrary querying condition occurrence in the query page generated according to the query demand of oneself, then can inquire about according to the querying condition occurrence of the query logic in respective queries example and input, and need not again write querying condition statement.
During the generated query page, the all query interfaces comprised are obtained in this query case in query case storage organization, and this query case for target data store name after, can according to the query interface generated query page, present to user, user corresponding query interface position is filled in the condition keyword needing inquiry in query page, then can be inquired about the list table or view that store target data by query page.
In order to make this device better be operated by user and use, on the basis of embodiment one, this device can also comprise human-computer interaction interface 16, in order to carry out a series of inquiry, input, output services.
Human-computer interaction interface 16, for making described data capture unit by described human-computer interaction interface typing, the store name information importing described target data and target data and memory word segment information, configure described inquiry field, condition field and query logic, querying condition according to configuring is inquired about, and present described query page generation unit generate query page for inquire about.
Human-computer interaction interface makes this device to be operated and to use, wherein be provided with special typing, importing interface is supplied to data capture unit, the list table of target data be can will store or view access in this device easily, title and the field information wherein of single table or view obtained.
Human-computer interaction interface can arrange querying condition configuration interface, be connected with instance storage element with query object storage unit, on the surface, user can first select or input the list table or view name that need to carry out inquiring about, namely human-computer interaction interface lists by the storage content of query object storage unit all field names comprised in this list table or view, user is again according to actual queries demand configuration querying field on human-computer interaction interface, condition field (comprising the condition field being set to query interface) and query logic, also can direct input inquiry SQL statement, complete the layoutprocedure of querying condition, and in instance storage element, the querying condition configured is preserved into query case.
For configured but also do not preserve into the querying condition of query case, also can be inquired about accordingly by human-computer interaction interface.
Human-computer interaction interface is also connected with query page generation unit, present the query page that query page generation unit generates, user's corresponding Position input or select after occurrence in query page, can inquire about according to the occurrence of input the list table corresponding to this query page or view.
On the basis of embodiment one, in order to the storage organization of query object storage unit is better described, provide embodiments of the invention two, as shown in Figure 3, query object storage unit 12 comprises further:
Object oriented memory module 121, claims and/or view name for all table names storing the storage target data that described data capture unit obtains.
All table names that object oriented memory module stores data capture unit acquisition claim and/or view name, and its concrete storage organization is as shown in table 1
Table 1 object oriented storage organization (COMPLEX_QUERY_OBJECT)
| Field name |
Describe |
Default value |
| OBJECT_ID |
Major key |
|
| OBJIECT_NAME |
Title |
The title of storage list or view |
| OBJECT_TYPE |
Object type |
0-shows, 1-view |
Such as: the table name singly show temp_order (order) when data capture unit 11 obtains, singly showing eva_temp_stat (comprehensive inquiry cutover) claims and field information, and then single table name is claimed to store in object oriented storage organization 121, store as shown in table 2 below, OBJECT_ID is the major key automatically generated.
Table 2 object oriented storage list
| OBJECT_ID |
OBJIECT_NAME |
OBJECT_TYPE |
| 400d0 |
temp_order |
0 |
| 400d1 |
eva_temp_stat |
0 |
Object field memory module 122, for storing the literary name name section of storage target data that described data capture unit obtains, attribute information and/or view field name, attribute information.
Multiple storage organization is comprised in object field memory module, storage organization is used for storing title and the information of all fields belonging to same single table or view, and each storage organization is associated by the external key OBJECT_ID list table corresponding to object oriented storage organization or view.As shown in table 3.
Table 3 object field storage organization (COMPLEX_QUERY_COLUMN)
Described object oriented memory module and described object field memory module are claimed by table name and/or view name associates.
Continue to use above-mentioned example, temp_order (order) is singly shown when data capture unit 11 obtains, the table name singly showing eva_temp_stat (comprehensive inquiry cutover) claims and field information, and then field information is stored in object field storage organization 122 stores, field SENDTIME (group's single time) is included in table temp_order, ISOVERSQTIME (application time), SENDDEPTID (Pai Dan department), SQNUM (request slip quantity), the fields such as SHEETTYPE (work order type), TASKCOMPLETELIMT (requiring feedback time) is comprised in table eva_temp_stat, DDUNM (scheduling odd number amount), TASKCOMPLETELIMIT (processing time), the fields such as DEPTID (industry number), storage mode is as shown in table 4 below, wherein COLUMN_ID is the major key that system generates automatically, OBJECT_ID is the external key of affiliated partner name storage table, can know which single table or view is which field belong to by the content in OBJECT_ID.
Table 4 object field storage list
| COLUMN_ID |
COLUNM_NAME |
COLUMN_TYPE |
OBJECT_ID |
| a32010 |
SENDTIME |
2 |
400d0 |
| a32011 |
ISOVERSQTIME |
2 |
400d0 |
| a32012 |
SENDDEPTID |
0 |
400d0 |
| a32013 |
SQNUM |
1 |
400d0 |
| a32014 |
SHEETTYPE |
0 |
400d0 |
| b89007 |
TASKCOMPLETELIMT |
2 |
400d1 |
| b89008 |
DDUNM |
1 |
400d1 |
| b89009 |
TASKCOMPLETELIMIT |
2 |
400d1 |
| b89010 |
DEPTID |
0 |
400d1 |
The list table of data acquisition or view name and field to be carried out point other to store, the access efficiency of whole system can be improved, thus improve the efficiency of inquiry.
On the basis of embodiment two, in order to the storage organization of better illustrated example storage unit, provide embodiments of the invention three, as shown in Figure 4, instance storage element 14 comprises further:
Example information memory module 141, is stored as query case for the querying condition configured by described condition dispensing unit, and preserves title and the attribute information of described query case.
All querying conditions that condition dispensing unit has configured by example information memory module all save as query case, store title and the attribute information of these query cases, it is a query case that a querying condition is saved, when there being new querying condition, need to preserve new query case, its storage organization is as shown in table 5, stored in Query Name in QUERY_NAME, Query Name is the unique identification of each query case, can be presented in human-computer interaction interface in order to the dominant query function that this query case completes to be described, given by user when querying condition being saved as query case, SELECT_COLUMNS is used for the inquiry field portions in the good querying condition of stored configuration, SQL_CONDITION is used for condition field in the good querying condition of stored configuration and query logic part, example is stored message structure and is connected with object oriented memory module as external key by OBJECT_ID, is the inquiry carried out which single table or view in order to describe each query case.Example information storage organization is as shown in table 5.
Table 5 example information storage organization (COMPLEX_QUERY)
| KM_CONTENTS_ |
Describe |
Default value |
| QUERY_ID |
Example ID (major key) |
|
| QUERY_NAME |
Query Name |
|
| SELECT_COLUMNS |
Inquiry row name |
|
| SQL_CONDITION |
SQL condition |
|
| OBJECT_ID |
Query object (external key) |
|
For condition dispensing unit " sending single information " querying condition to the configuration of temp_order table:
" Select group single time, and application time fromtableorderwhere (Pai Dan department=?) and (request slip quantity > ?) ", this querying condition is saved in example information storage list, as shown in table 6:
Table 6 example information storage list
If querying condition is all fixed value, then in the SQL_CONDITION field in example information storage list, be also stored as fixed value, such as querying condition is:
" Select group single time; application time fromtableorderwhere (Pai Dan department=Ministry of Construction) and (request slip quantity >10) ", then the storage in SQL_CONDITION field then becomes " (the SENDDEPTID=Ministry of Construction) and (SQNUM>10) "
Instance field memory module 142, for storing the field attribute information of the query case that described example information memory module stores, comprise field name, whether this field is inquiry field, whether this field is condition field, be set to the location number etc. of the condition field of query interface, because the condition field being only set to query interface just has location number, the occurrence of its location number according in example information storage organization SQL_CONDITION field store "? " position is determined, when after the condition field being set to query interface be first "? " time, then its location number is 1, the like.Whether therefore location number can being had to determine according to this field, whether this field is query interface, instance field storage organization is using COLUMN_ID as external key, associate with object field storage list, obtain the information of this field, and then which single table or view is this field known belong to, using QUERY_ID as external key, associate with example information table, this field can belong to which query case.As shown in table 7.
Table 7 instance field storage organization (COMPLEX_QUERY_COLUMN_INST)
| Field name |
Describe |
Default value |
| COLUMN_INST_ID |
ID |
|
| IS_SELECT_COLUMN |
Whether be inquiry row names |
|
| IS_CONDITION_COLUMN |
Whether be condition row names |
|
| POSITION_NUM |
Location number |
|
| COLUMN_ID |
Field ID (external key) |
|
| QUERY_ID |
Inquiry ID (external key) |
|
Same for above-mentioned " sending single information " querying condition, the instance field storing process of this query case is described, as shown in table 8 below: COLUMN_INST_ID is the Field ID number automatically generated, COLUMN_ID can be associated to object field storage list (table 4) as external key, QUERY_ID can be associated to example information storage list (table 6) as external key, these instance field known relate to the query case of " sending single information " in table 6, relate to a32010 (SENDTIME in table 4, group's single time), a32011, (ISOVERSQTIME, application time), a32011 (SENDDEPTID, Pai Dan department), a32011, (SQNUM, request slip quantity) field, according to the attribute information stored in table, group's single time, application time is inquiry field, Pai Dan department, request slip quantity is the condition field being set to query interface.
Table 8 instance field storage list
After completing above-mentioned a series of storage, the example id that described query page generation unit 15 stores according to described example information memory module 141, all condition fields being set to query interface in this query case are obtained in instance field memory module 142, according to the condition field obtained, generate with the query page of Query Name name.
Based on above-described embodiment, when user needs the generated query page, the example id that query page generation unit 15 stores according to example information memory module 141, if the QUERY_ID in table 6 is E5001, all field informations being set to query interface are obtained in table 8 instance field storage list, for Pai Dan department and request slip quantity, then according to these two field informations, generate corresponding query page, that can carry out " sending single information " querying condition repeats inquiry, in the query page generated, different Pai Dan departments and request slip quantity can be inputted, query page generation unit 15 is according to the Position Number of query interface, by in the occurrence substitution tables 6 of input in SQL_CONDITION field "? " and according to " sending single information " query case preserved, single table temp_order is inquired about, present the result of inquiry, avoid the workload repeating to write query SQL, improve efficiency.
The present invention also provides a kind of query page generation method, as shown in Figure 5, comprises the following steps:
Step S101: the store name information and the memory word segment information that obtain target data.
For various target data, all store in the mode of single table or view at present, therefore data capture unit obtains the method for data can be directly import the list table or view that store target data, obtain each field information in table/view name information and table/view, wherein the information of each field comprises field name, field type, field represent type etc.
Step S102: according to pre-set query object storage organization, stores respectively by the target data store name information of described acquisition and memory word segment information.
The store name information of target data is stored, stores by the list table of all storage target datas or the title of view;
Stored by the memory word segment information of target data, the field information by all fields comprised in each single table or view stores respectively as a storage unit, and field information comprises field name, field type, field represent type etc.;
And preservation list shows or the storage organization of view name associates, to determine to find the list table corresponding with field information or view by major key with the major key of setting for the storage organization of preservation field information.
Step S103: according to actual queries demand, is configured to inquiry field and condition field respectively by the target data field of described storage, and the querying condition that the query logic of configuration condition interfield has formed, described condition field can be configured to query interface.
Preferably, be configured to the value of the condition field of query interface, store time can identify by asterisk wildcard, with represent its can for setting arbitrary value, asterisk wildcard can be "? ", " * ", " # ", the arbitrary symbol such as " & ".
The different querying condition that query demand and user need the Query Result of acquisition according to it and arrange, be made up of query aim data, querying condition data and query logic, when the field information of query object cell stores is configured to inquiry field, this field is query aim data, namely inquires about all data in this field; When the field information of query object cell stores is configured to condition field, this field is querying condition data, namely inquires about using this field as condition; Query logic generally comprises the operation rule that "AND", "or", " equaling ", " being greater than ", " being less than ", " being not equal to ", " being not more than ", " being not less than " etc. indicate, with the order of operation specified by bracket, further in order to make the result of inquiry more comprehensive, the arithmetic logic of fuzzy query can also be introduced, the number percent of given query result and querying condition coupling.
The mode of configuration condition can adopt the mode of configuration interface, namely on interface, present the table/view of query object cell stores, and the field information comprised in each table, by the mode configuration querying condition selected, also the mode of writing query statement can be selected, directly by describing mode configuration querying conditions such as query SQL.
Step S104: the querying condition of described configuration is saved as query case according to the sequence of positions of configuration in pre-set query case storage organization.
The querying condition configured is saved as query case, is convenient to give occurrence according to query demand to the condition field being set to query interface in same queries condition, ensures that this querying condition is reused, and do not need to reconfigure.
It is a query case that each querying condition configured is saved, and according to arranging inquiry field during configuration querying condition and the order of condition field is preserved, and gives Position Number respectively for the condition field being set to query interface.
Query case storage organization for store all query cases, this query case for target data store single table or view name, querying condition that query case is corresponding, and field name involved by each query case and field attribute information, comprise whether this field is inquiry field, whether this field is condition field etc., and store separately the relevant information being set to the condition field of query interface, also can preserve according to the actual requirements if need to store other information.
Step S105: according to the condition field generated query page being configured to query interface in described query case.
Namely can change its occurrence according to the condition field being configured to query interface in query case and reach the field of inquiring about multiplexing object, therefore user can input arbitrary querying condition occurrence in the query page generated according to the query demand of oneself, then can inquire about according to the querying condition occurrence of the query logic in respective queries example and input, and again need not write querying condition.
According to above step, according to Fig. 5, the step of preferred above-described embodiment four also comprises:
Step S106: by human-computer interaction interface typing, the store name information importing target data and memory word segment information, configure described inquiry field, condition field and query logic, querying condition according to configuring is inquired about, and presents the query page of described generation and inquires about according to the query page generated.
The principle of work of each step in this method, said apparatus part is similar all, please refer to corresponding description, does not repeat them here.
The invention still further relates to a kind of using method of query page generating device, as shown in Figure 6, it is characterized in that, described method comprises step:
Step S201: list table and/or the view name of selecting the storage target data needing inquiry.
The list table and/or the view that need inquiry is selected by human-computer interaction interface
Step S202: according to list table and/or the view name of described selection, obtain its field name comprised and the querying condition formed according to the query logic of actual queries demand configuration querying field respectively, condition field and interfield, described condition field can be configured to query interface.
After having selected, human-computer interaction interface is according to the storage content of query page generating device, present all field names of this list table or view further, user according to query demand configuration querying condition on human-computer interaction interface, can comprise the query logic of configuration querying field, condition field and interfield.
Described querying condition is saved as query case by S203.
By the save button that machine Interaction Interface Design is good, preserved by the querying condition configured, then query page generating device then can be preserved query case according to the storage organization designed.
S204, according to the query interface generated query page comprised in query case, inputs each field occurrence and completes inquiry in query page.
When the needs generated query page, button is generated by the query page clicked in human-computer interaction interface, the query page generation unit set out in query page generating device is according to the query interface generated query page comprised in query case, the occurrence of each field can be inputted in the query page generated, finally complete inquiry.
Preferably, step S203 and step S204 can be replaced with step S205 as shown in Figure 7 and directly complete inquiry.
S205 completes inquiry according to the occurrence inputting each field in the querying condition configured.
If do not need the generated query page, user also according to the querying condition of oneself configuration, directly inquire about single table or view, and the occurrence inputting each field can carry out inquiring about.
Preferably, after step S205, step S206 can also be comprised, in order to issue the example preserved.
S206: the query case of described preservation is issued.
The query case preserved being issued, mainly in order to make these query cases be employed more widely, saving the cost of research and development further.
Present invention also offers a kind of query page generating device that uses and carry out the method for inquiring about, when there is new query demand, user is by human-computer interaction interface configuration querying condition in query page generating device, and the querying condition configured is saved as query case, according to the query interface generated query page in query case, the occurrence of each field is inputted in query page, finally complete inquiry, and do not need to make any amendment to the program on backstage, greatly save the workload of inquiry, improve efficiency.Configuration querying condition, the process of preserving query case and the generated query page with above described in consistent, do not repeat them here.
When having saved multiple queries example in query page generating device, and when generating the multiple queries page, query page generating device will present query page list, user can select generated query page according to the query demand of oneself, in query page, input each field occurrence can inquire about, do not need the change of querying condition configuration and the code carried out, make inquiry become easier.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.