Summary of the invention
The generating apparatus that the purpose of this invention is to provide a kind of query page; Can inquire about with different query demands to different target datas; When change appears in query demand, only need reconfigure query statement, or can accomplish inquiry according to the new querying condition of query page input that generates; Need not carry out complicated coding change, reach the purpose of software reuse.
The technical scheme that the present invention adopts is following:
A kind of query page generating apparatus, said device comprises:
Data capture unit is used to obtain the store name information and the memory word segment information of target data;
The query object storage unit is used for according to pre-set query object storage organization, and the store name information and the memory word segment information of the said target data that will obtain through said data capture unit are stored respectively;
The condition dispensing unit; Be used for according to the actual queries demand; The field information of said query object cell stores is configured to respectively inquire about field and condition field, and the query logic of configuration condition interfield, complete querying condition formed; Can be configured to query interface in the said condition field, identifying the described content of this condition field can change;
The instance storage unit with the querying condition of said condition dispensing unit configuration, is preserved into query case according to the sequence of positions of configuration in pre-set query case storage organization;
The query page generation unit is used for being configured to according to the query case of said instance cell stores the condition field generated query page of query interface.
The described occurrence that is configured to the condition field of query interface identifies with wild symbol when storage.
Preferably, said device also comprises:
Human-computer interaction interface; Be used to make store name information and the memory word segment information of said data capture unit by said human-computer interaction interface typing, the said target data of importing and target data; Dispose said inquiry field, condition field and query logic; Querying condition according to configuring is inquired about, and presents the query page confession inquiry use that said query page generation unit generates.
Further, said query object storage unit specifically comprises:
The object oriented memory module, all table names that are used to store the storage target data that said data capture unit obtains are claimed and/or view name;
The object field memory module is used to store literary name name section, attribute information and/or view field title, the attribute information of the storage target data that said data capture unit obtains;
Said object oriented memory module claims through table name with said object field memory module and/or view name carries out related.
Concrete, described instance storage unit further comprises:
The instance information storage module is used for the querying condition that said condition dispensing unit configuration is accomplished is stored as query case, and preserves the title and the attribute information of said query case;
The instance field memory module; Be used to store the field attribute information of the query case of said instance information storage module storage, comprise field title, this field whether be inquiry field, this field whether be condition field, for being set to the condition field allocation position numbering of query interface.
Preferably, described query page generation unit is according to the query case of said instance information storage module storage, obtains that all are set to the condition field of query interface in this query case, according to the condition field that obtains, the generated query page.
Preferably, said device also comprises:
The query case release unit is used for the query case of said instance cell stores is distributed to other users.
The invention also discloses a kind of query page generation method, said method comprises:
Obtain the 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 and the memory word segment information of said acquisition are stored respectively;
According to the actual queries demand, the target data field of said storage is configured to respectively inquire about field and condition field, and the query logic of configuration condition interfield to form the querying condition of accomplishing, said condition field can be configured to query interface;
The querying condition of said configuration is saved as query case according to the sequence of positions that disposes in pre-set query case storage organization;
According to the condition field generated query page that is configured to query interface in the said query case.
Preferably,
Described condition field can be configured to query interface, when storage, identifies with wild symbol.
Preferably, said method also comprises
Store name information and memory word segment information through human-computer interaction interface typing, importing target data; Dispose said inquiry field, condition field and query logic; Querying condition according to configuring is inquired about, and presents the query page of said generation and inquires about according to the query page that generates.
Further,
The target data store name information of said storage is the storage list title and/or the view name of target data;
The target data memory word segment information of said storage is memory word name section, attribute information and/or view field title, the attribute information of target data.
Further,
The querying condition that said configuration is accomplished is stored as query case, and preserves the title and the attribute information of said query case;
Preserve the field attribute information of said query case, comprise whether field title, this field are the inquiry field, whether this field is whether condition field, this condition field are query interface, are the condition field allocation position numbering that is set to query interface.
Further,
According to the field information of said query case, obtain the condition field that is set to query interface in the said query case, according to the condition field that obtains, the generated query page.
The invention also discloses a kind of method of application of query page generating apparatus, said method comprises:
Selection needs the single table and/or the view name of the storage target data of inquiry;
Single table and/or view name according to said selection; Obtain its field title that comprises and form the querying condition of accomplishing according to the query logic of actual queries demand difference configuration querying field, condition field and interfield, said condition field can be configured to query interface;
Occurrence according to each field of input in the querying condition of configuration completion is accomplished inquiry; Or, said querying condition is saved as query case, according to the query interface generated query page that is comprised in the query case, each field occurrence of input is accomplished inquiry in query page.
Preferably, said method also comprises:
Query case issue with said preservation.
The invention also discloses a kind of method of using the query page generating apparatus to inquire about, said method comprises:
According to query demand configuration querying condition in the query page generating apparatus, preserve query case, the generated query page, the occurrence of each field of input is accomplished inquiry in query page;
Or selection meets the query page of query demand in the query page that has generated, and the occurrence of each field of input is accomplished inquiry in query page.
The present invention only need be the table or the view of any storage target data that the user paid close attention to; Mode through importing, typing is linked in this device; Through importing the query case of confirming in advance; Target data is obtained in completion, and can carry out query manipulation to the data of all accesses according to query demand, has overcome in the prior art defective that can only write query statement and inquire about to certain specific target data according to the query software of demand exploitation; Through target matrix/view and the field title that obtains, the user can realize the different query demands of user to the different target data according to actual queries demand flexible configuration querying condition; Condition field through changing key word of the inquiry is set to query interface; Querying condition is saved as query case; According to the query case generated query page; The user can accomplish the inquiry of different key words according to the query case of preserving according to query demand different key word of input in the query page that generates; Query demand like the user is changed, and only need reconfigure querying condition and generate new query page to get final product, and revises flexible and need not be directed against new demand and carry out a large amount of R&D works; Through to preserving the issue of query case, realized sharing of query case, the user can further improve the extent for multiplexing to query manipulation according to the own available inquiry of query case screening of issue.
Embodiment
In order to make those skilled in the art person can understand the present invention program better, the present invention is done further detailed description below in conjunction with accompanying drawing and embodiment.
With reference to Fig. 1, be the structural representation of a kind of query page generating apparatus of the present invention embodiment one.
Data capture unit 11 is used to obtain the store name information and the memory word segment information of target data.
For all types of target data; All store at present with the mode of single table or view; Therefore data capture unit obtains single table or the view that the method for data can be a directly importing storage target data; Obtain each field information in table/view name information and the table/view, wherein the information of each field comprise that field name is claimed, field type etc.
Query object storage unit 12 is used for according to pre-set query object storage organization, and the store name information and the memory word segment information of the said target data that will obtain through said data capture unit are stored respectively.
The store name information of the target data that data capture unit is obtained is stored, and is about to the single table of all storage target datas or the title of view and stores;
The memory word segment information of the target data that data capture unit is obtained is stored; The field information of all fields that soon comprised in each single table or the view is stored; Field information comprises that field title, field type, field represent type etc.; Like other attributes of needs storage, also store according to the actual requirements;
The storage organization of preserving field information carries out related with major key of setting and the storage organization of preserving single table or view name, to confirm and can find the list corresponding with this field information to show or view through major key.
Condition dispensing unit 13; Be used for according to the actual queries demand; The target data field information of said query object cell stores is configured to the inquiry field and the condition field of query statement respectively, and the query logic of configuration condition interfield, complete querying condition formed; Said condition field can be configured to query interface, and identifying the described content of this condition field can change.
Preferably, being configured to the value of the condition field of query interface, when storage, can identifying by asterisk wildcard, can be the arbitrary value of setting to represent it, asterisk wildcard can be "? ", symbol arbitrarily such as " * ", " # ", " & ".
The different querying condition that the query demand Query Result that to be the user obtain according to its needs is provided with; Form by query aim data, querying condition data and query logic; When the field information of query object cell stores is configured to inquire about field; This field is the query aim data, promptly all data in this field is inquired about; When the field information of query object cell stores was configured to condition field, this field was the querying condition data, promptly inquires about as condition with this field; Query logic generally comprise " with ", " or ", " equaling ", " greater than ", " less than ", the operation rule that indicates such as " being not equal to ", " being not more than ", " being not less than "; The order of operation that is indicated with bracket; The result in order to make inquiry further is more comprehensive; Can also introduce the arithmetic logic of fuzzy query, the number percent of given query result and querying condition coupling.
The mode of configuration querying condition can adopt the mode of configuration interface; Table/the view that promptly on the interface, presents the query object cell stores; And the field information that is comprised in each table; Through the mode configuration querying condition of selecting, also can select the mode of writing query statement for use, directly through describing mode configuration querying conditions such as SQL query statements.The form of query SQL is " a SELECT query contents FROM table name WHERE querying condition ".
Mode configuration querying condition with configuration interface is an example; As shown in Figure 2; List table name in the query object storage unit in the query composition condition box and be called all field titles that comprised in single table of " order "; The field as the query aim data that the person of being to use selects in the inquiry row frame is specially " single time of group " and " application time "; Logic selects the district to enumerate alternative all arithmetic logics; The person of being to use selects in the condition row frame as the field of querying condition data and the arithmetic logic of having selected.
For the querying condition that makes configuration can repeatedly be used flexibly; Field for as the querying condition data can be set to query interface; Occurrence to identify this querying condition can change according to the actual queries demand; When condition field " is sent single department " and " request slip quantity " when being set to query interface, querying condition just become " (send single department=?) and (request slip quantity>?) ", then the SQL query condition is:
Single time of SELECT group; Application time FROM table order WHERE (send single department=?) and (request slip quantity>?); Can replace arbitrarily the content of question mark setting, can inquire about " single time of group " and " application time " of single department of other groups and other request slip quantity
Be specially " (sending single department=Ministry of Construction) and (request slip quantity>10) " when the specified requirements field; The implication of the querying condition that this configures is that the department of in table order, searching " sends single time " and " application time " for " Ministry of Construction " and " request slip quantity " greater than worker's list of 10.
Mode configuration querying condition with SQL is an example, and then the SQL query condition is:
Single time of Select group; Application time from table order where (sending single department=Ministry of Construction) and (request slip quantity>10); Certainly in the actual storage process, fields such as single time of the group in the SQL query condition, application time are all preserved and input with the English name of correspondence.
Instance storage unit 14 with the querying condition of said condition dispensing unit configuration, is preserved into query case according to the sequence of positions of configuration in pre-set query case storage organization, and is that the condition field that is set to query interface is given Position Number respectively.
The querying condition that configures is saved as query case, be convenient to give occurrence to the condition field that is set to query interface in the same queries condition, guarantee that this querying condition is able to reuse, and need not reconfigure according to query demand.
The querying condition that each bar configures is saved as a query case, and the order that inquiry field and condition field are set during according to the configuration querying condition is preserved, and is that the condition field that is set to query interface is given Position Number respectively.
The query case storage organization is used to store all target datas that query case, this query case were directed against and stores single table or view name, querying condition that query case is corresponding; And involved field title and the field attribute information of each query case; Comprise whether this field is whether inquiry field, this field are condition field etc.; And independent relevant information of storing the condition field that is set to query interface, store other information if desired and also can preserve according to the actual requirements.
Query page generation unit 15 is used for being configured to according to the query case of said instance cell stores the condition field generated query page of query interface.
Be configured to the condition field of query interface in the query case, can obtain different querying conditions, reach the purpose of multiplexing querying condition through the different occurrences of query interface.Therefore the user can import querying condition occurrence arbitrarily according to the query demand of oneself in the query page that generates; Then can inquire about, and needn't write the querying condition statement again according to the querying condition occurrence of query logic in the respective queries instance and input.
During the generated query page; In the query case storage organization, obtain all query interfaces that comprise in this query case; And behind the target data store name that this query case was directed against, can present to the user according to the query interface generated query page; The user is filling in the condition keyword that needs inquiry on the corresponding query interface position on the query page, then can inquire about the single table or the view of storage target data through query page.
In order to make this device better not be used person's operation and to 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; Be used to make store name information and the memory word segment information of said data capture unit by said human-computer interaction interface typing, the said target data of importing and target data; Dispose said inquiry field, condition field and query logic; Querying condition according to configuring is inquired about, and presents the query page confession inquiry use that said query page generation unit generates.
Human-computer interaction interface makes this device and to use by operation; Wherein be provided with special typing, import the interface and offer data capture unit; In the single table or this device of view access with the storage target data, obtain single table or the title of view and field information wherein easily.
Human-computer interaction interface can be provided with the querying condition configuration interface; Be connected with the instance storage unit with the query object storage unit; On this interface; The user can select or import single table or the view name that need inquire about earlier; Human-computer interaction interface can be listed all field titles that comprise in this list table or the view through the memory contents of query object storage unit, and the user is again according to actual queries demand configuration querying field, condition field (comprising the condition field that is set to query interface) and query logic on human-computer interaction interface, also direct input inquiry SQL statement; Accomplish the layoutprocedure of querying condition, and in the instance storage unit, will dispose the querying condition of accomplishing and preserve into query case.
For configured but also do not preserve into the querying condition of query case, also can inquire about accordingly through human-computer interaction interface.
Human-computer interaction interface also is connected with the query page generation unit; Present the query page that the query page generation unit generates; The user in query page the input of corresponding position or select occurrence after, can inquire about according to the occurrence of input pairing single table of this query page or view.
On the basis of embodiment one, for the storage organization of query object storage unit better is described, provide embodiments of the invention two, as shown in Figure 3, query object storage unit 12 further comprises:
Object oriented memory module 121, all table names that are used to store the storage target data that said data capture unit obtains are claimed and/or view name.
The object oriented memory module has been stored all table names that data capture unit obtains and has been claimed and/or view name that its concrete storage organization is as shown in table 1
Table 1 object oriented storage organization (COMPLEX_QUERY_OBJECT)
The field title |
Describe |
Default value |
OBJECT_ID |
Major key |
|
OBJIECT_NAME |
Title |
The title of storage list or view |
OBJECT_TYPE |
Object type |
The 0-table, the 1-view |
For example: the table name that has obtained single table temp_order (order), single table eva_temp_stat (comprehensive inquiry cutover) when data capture unit 11 is claimed and field information; And then single table name claimed in object oriented storage organization 121, to store; Store as shown in table 2 belowly, OBJECT_ID is the major key that automatically generates.
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 is used to store literary name name section, attribute information and/or view field title, the attribute information of the storage target data that said data capture unit obtains.
Comprise a plurality of storage organizations in the object field memory module; Storage organization is used for storing the title and the information of all fields that belong to same single table or view, and each storage organization is through corresponding single show or view carries out related in external key OBJECT_ID and the object oriented storage organization.As shown in table 3.
Table 3 object field storage organization (COMPLEX_QUERY_COLUMN)
The field title |
Describe |
Default value |
COLUMN_ID |
Major key |
|
COLUNM_NAME |
The field title |
|
COLUMN_TYPE |
Field type |
The 0-character, 1-numeral, 2-time, 3-boolean |
OBJECT_ID |
Query object (external key) |
|
Said object oriented memory module claims through table name with said object field memory module and/or view name carries out related.
Continue to use above-mentioned example; Obtained the table name of single table temp_order (order), single table eva_temp_stat (comprehensive inquiry cutover) claims and field information when data capture unit 11; And then field information is stored in the object field storage organization 122 stores; Include field SENDTIME (single time of group), ISOVERSQTIME (application time), SENDDEPTID (sending single department), SQNUM (request slip quantity), SHEETTYPE fields such as (the single types of worker) among the table temp_order; Comprise TASKCOMPLETELIMT (requiring feedback time), DDUNM (scheduling odd number amount), TASKCOMPLETELIMIT (processing time), DEPTID fields such as (department's numberings) among the table eva_temp_stat; Storage mode is as shown in table 4 below; Wherein COLUMN_ID is the major key that system generates automatically, and OBJECT_ID is the external key of affiliated partner name storage table, can know through the content among the OBJECT_ID which single table or view is which field belong to.
Table 4 object field storage list
Single table that data are obtained or view name and field are divided other storage, can improve the access efficiency of total system, thereby improve the efficient of inquiry.
On the basis of embodiment two, the storage organization for better illustrated example storage unit provides embodiments of the invention three, and as shown in Figure 4, instance storage unit 14 further comprises:
Instance information storage module 141 is used for the querying condition that said condition dispensing unit configuration is accomplished is stored as query case, and preserves the title and the attribute information of said query case.
All querying conditions that the instance information storage module is accomplished the configuration of condition dispensing unit all save as query case; Store the title and the attribute information of these query cases, a querying condition is saved as a query case, when new querying condition; Need to preserve new query case; Its storage organization is as shown in table 5, in QUERY_NAME, deposits Query Name in, and Query Name is the unique identification of each query case; Can be presented on the main query function in order to explain that this query case is accomplished in the human-computer interaction interface; The person of being used gives when querying condition is saved as query case, and SELECT_COLUMNS is used for the inquiry field part in the good querying condition of stored configuration, and SQL_CONDITION is used for condition field and query logic part in the good querying condition of stored configuration; Instance canned data structure is connected with the object oriented memory module as external key through OBJECT_ID, is the inquiry to which is singly shown or view carries out in order to describe each query case.The instance structure information storage is as shown in table 5.
Table 5 instance structure information storage (COMPLEX_QUERY)
KM_CONTENTS_ |
Describe |
Default value |
QUERY_ID |
Example ID (major key) |
|
QUERY_NAME |
Query Name |
|
SELECT_COLUMNS |
Inquiry row name |
|
SQL_CONDITION |
The SQL condition |
|
OBJECT_ID |
Query object (external key |
|
Is example with the condition dispensing unit to " sending single information " querying condition that the temp_order table disposes:
" single time of Select group, application time from table order where (send single department=?) and (request slip quantity>?) ", this querying condition is saved in the instance message store table, as shown in table 6:
Table 6 instance message store table
If querying condition all is a fixed value, then in the SQL_CONDITION field in the instance message store table, also be stored as fixed value, for example querying condition is:
" single time of Select group; application time from table order where (sending single department=Ministry of Construction) and (request slip quantity>10) ", then the storage in the SQL_CONDITION field then becomes " (the SENDDEPTID=Ministry of Construction) and (SQNUM>10) "
Instance field memory module 142; Be used to store the field attribute information of the query case of said instance information storage module storage; Comprise whether field title, this field be whether inquiry field, this field are condition field, are set to the location number etc. of the condition field of query interface; Because the condition field that only is set to query interface just has location number, the occurrence of its location number according in the instance structure information storage SQL_CONDITION field store "? " The position confirms, after the condition field that is set to query interface be first "? " The time; Then its location number is 1, and the like.Therefore can whether there be location number to confirm whether this field is query interface according to this field; The instance field storage organization with COLUMN_ID as external key, related with the object field storage list, obtain the information of this field; And then can know which single table or view is this field belong to;, related with QUERY_ID with the instance information table as external key, can this field belong to which query case.As shown in table 7.
Table 7 instance field storage organization (COMPLEX_QUERY_COLUMN_INST)
The field title |
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) |
|
Be example with above-mentioned " sending single information " querying condition equally, the instance field storing process of this query case is described, as shown in table 8 below: COLUMN_INST_ID is the Field ID that automatically generates number; COLUMN_ID can be associated to object field storage list (table 4) as external key, and QUERY_ID can be associated to instance message store table (table 6) as external key, can know that these instance field relate to the query case of " sending single information " in the table 6; Relate to a32010 in the table 4 (SENDTIME, single time of group), a 32011, (ISOVERSQTIME; Application time), a32011 (SENDDEPTID sends single department), a32011, (SQNUM; Request slip quantity) field; Attribute information according to storage in the table can know that single time of group, application time are the inquiry field, and sending single department, request slip quantity is the condition field that is set to query interface.
Table 8 instance field storage list
After accomplishing above-mentioned a series of storages; Described query page generation unit 15 is according to the instance id of said instance information storage module 141 storages; All are set to the condition field of query interface in this query case of acquisition in instance field memory module 142; According to the condition field that obtains, generate query page with the Query Name name.
With the foregoing description is the basis, and when the user needed the generated query page, query page generation unit 15 was according to the instance id of instance information storage module 141 storages; Like the QUERY_ID in the table 6 is E5001, in table 8 instance field storage list, obtains all and is set to the field information of query interface, for sending single department and request slip quantity; Then, generate corresponding query page, can carry out the inquiry that repeats of " sending single information " querying condition according to these two field informations; On the query page that generates; Can import single department of different group and request slip quantity, query page generation unit 15 is according to the Position Number of query interface, with in the SQL_CONDITION field in the occurrence substitution tables of importing 6 "? " And according to " sending single information " query case of preserving list is shown temp_order and inquire about; The result who presents inquiry has avoided repeating to write the workload of query SQL, has improved efficient.
The present invention also provides a kind of query page generation method, and is as shown in Figure 5, may further comprise the steps:
Step S101: the store name information and the memory word segment information that obtain target data.
For all types of target data; All store at present with the mode of single table or view; Therefore data capture unit obtains single table or the view that the method for data can be a directly importing storage target data; Obtain each field information in table/view name information and the table/view, wherein the information of each field comprises that field name is claimed, field type, field represent type etc.
Step S102:, the target data store name information and the memory word segment information of said acquisition are stored respectively according to pre-set query object storage organization.
The store name information of target data is stored, be about to the single table of all storage target datas or the title of view and store;
The memory word segment information of target data is stored, and the field information of all fields that soon comprised in each single table or the view is stored respectively as a storage unit, and field information comprises that field title, field type, field represent type etc.;
The storage organization of preserving field information carries out related with major key of setting and the storage organization of preserving single table or view name, to confirm and can find the list corresponding with field information to show or view through major key.
Step S103: according to the actual queries demand, the target data field of said storage is configured to respectively inquire about field and condition field, and the query logic of configuration condition interfield forms the querying condition of accomplishing, said condition field can be configured to query interface.
Preferably, being configured to the value of the condition field of query interface, when storage, can identifying by asterisk wildcard, can be the arbitrary value of setting to represent it, asterisk wildcard can be "? ", symbol arbitrarily such as " * ", " # ", " & ".
The different querying condition that the query demand Query Result that to be the user obtain according to its needs is provided with; Form by query aim data, querying condition data and query logic; When the field information of query object cell stores is configured to inquire about field; This field is the query aim data, promptly all data in this field is inquired about; When the field information of query object cell stores was configured to condition field, this field was the querying condition data, promptly inquires about as condition with this field; Query logic generally comprise " with ", " or ", " equaling ", " greater than ", " less than ", the operation rule that indicates such as " being not equal to ", " being not more than ", " being not less than "; The order of operation that is indicated with bracket; The result in order to make inquiry further is more comprehensive; Can also introduce the arithmetic logic of fuzzy query, the number percent of given query result and querying condition coupling.
The mode of configuration condition can adopt the mode of configuration interface; Table/the view that promptly on the interface, presents the query object cell stores; And the field information that is comprised in each table; Through the mode configuration querying condition of selecting, also can select the mode of writing query statement for use, directly through describing mode configuration querying conditions such as query SQL.
Step S104: the querying condition of said configuration is saved as query case according to the sequence of positions that disposes in pre-set query case storage organization.
The querying condition that configures is saved as query case, be convenient to give occurrence to the condition field that is set to query interface in the same queries condition, guarantee that this querying condition is able to reuse, and need not reconfigure according to query demand.
The querying condition that each bar configures is saved as a query case, and the order that inquiry field and condition field are set during according to the configuration querying condition is preserved, and is that the condition field that is set to query interface is given Position Number respectively.
The query case storage organization is used to store all target datas that query case, this query case were directed against and stores single table or view name, querying condition that query case is corresponding; And involved field title and the field attribute information of each query case; Comprise whether this field is whether inquiry field, this field are condition field etc.; And independent relevant information of storing the condition field that is set to query interface, store other information if desired and also can preserve according to the actual requirements.
Step S105: according to the condition field generated query page that is configured to query interface in the said query case.
Promptly can change the field that its occurrence reaches the multiplexing purpose of inquiry according to the condition field that is configured to query interface in the query case; Therefore the user can import querying condition occurrence arbitrarily according to the query demand of oneself in the query page that generates; Then can inquire about, and needn't write querying condition again according to the querying condition occurrence of query logic in the respective queries instance and input.
According to above step, according to Fig. 5, the step of preferred the foregoing description four also comprises:.
Step S106: through the store name information and the memory word segment information of human-computer interaction interface typing, importing target data; Dispose said inquiry field, condition field and query logic; Querying condition according to configuring is inquired about, and presents the query page of said generation and inquires about according to the query page that generates.
The principle of work of each step in this method, all the said apparatus part is similar, please with reference to corresponding description, repeats no more at this.
The invention still further relates to a kind of method of application of query page generating apparatus, as shown in Figure 6, it is characterized in that said method comprises step:
Step S201: selection needs the single table and/or the view name of the storage target data of inquiry.
The single table and/or the view that can need inquiry through the human-computer interaction interface selection
Step S202: according to the single table and/or the view name of said selection; Obtain its field title that comprises and form the querying condition of accomplishing according to the query logic of actual queries demand difference configuration querying field, condition field and interfield, said condition field can be configured to query interface.
After selecting completion; Human-computer interaction interface is according to the memory contents of query page generating apparatus; All field titles that further present this list table or view; The user can comprise the query logic of configuration querying field, condition field and interfield according to query demand configuration querying condition on human-computer interaction interface.
S203 saves as query case with said querying condition.
Through the save button that human-computer interaction interface designs, the querying condition that configures is preserved, then the query page generating apparatus then can be according to the storage organization that designs query case being preserved.
S204 is according to the query interface generated query page that is comprised in the query case, and each field occurrence of input is accomplished inquiry in query page.
When the needs generated query page; Query page through clicking in the human-computer interaction interface generates button; Query page generation unit in the query page of the setting out generating apparatus is according to the query interface generated query page that comprises in the query case; Can in the query page that generates, import the occurrence of each field, the final completion inquired about.
Preferably, as shown in Figure 7ly can step S203 and step S204 be replaced with step S205 and directly accomplish inquiry.
S205 accomplishes inquiry according to the occurrence of each field of input in the querying condition of configuration completion.
If do not need the generated query page, the user also can directly inquire about single table or view according to the querying condition of oneself configuration, and the occurrence of each field of input is inquired about and got final product.
Preferably, behind step S205, can also comprise step S206, in order to the instance of issue preservation.
S206: with the query case issue of said preservation.
With the query case issue of preserving, mainly be in order these query cases to be employed more widely, further to save the cost of research and development.
The present invention also provides a kind of method of using the query page generating apparatus to inquire about; When new query demand occurring, the user can pass through human-computer interaction interface configuration querying condition in the query page generating apparatus, and the querying condition that configures is saved as query case; According to the query interface generated query page in the query case; The occurrence of each field of input in query page, the final completion inquired about, and need not make any modification to the program on backstage; Save the workload of inquiry greatly, improved efficient.The configuration querying condition, the process of preserving the query case and the generated query page repeats no more at this with consistent described in the preamble.
A plurality of query cases in the query page generating apparatus, have been preserved; And when having generated a plurality of query page; The query page generating apparatus will present the query page tabulation, the query page that the user can generate according to the query demand selection of oneself, and each field occurrence of input can be inquired about in query page; The querying condition configuration that need not carry out and the change of code make inquiry become easier.
The above only is a preferred implementation of the present invention; Should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; Can also make some improvement and retouching, these improvement and retouching also should be regarded as protection scope of the present invention.