CN107844519A - Electronic installation, data base querying scenario generation method and storage medium - Google Patents
Electronic installation, data base querying scenario generation method and storage medium Download PDFInfo
- Publication number
- CN107844519A CN107844519A CN201710929614.1A CN201710929614A CN107844519A CN 107844519 A CN107844519 A CN 107844519A CN 201710929614 A CN201710929614 A CN 201710929614A CN 107844519 A CN107844519 A CN 107844519A
- Authority
- CN
- China
- Prior art keywords
- script
- data
- data base
- base querying
- subdirectory
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/242—Query formulation
- G06F16/2433—Query languages
- G06F16/2445—Data retrieval commands; View definitions
Abstract
The invention discloses a kind of electronic installation, data base querying scenario generation method and storage medium, when needing to carry out related data query to database, generates a data base querying instruction based on data to be checked, and transfer the data base querying template prestored;The master catalogue of classification ergodic data library inquiry template based on inquiry data, obtain each function subdirectory under the master catalogue and the master catalogue to match with the classification of inquiry data;If the function subdirectory for there are the functional attributes with data to be checked under the category to match in each function subdirectory, obtain the sql script files being pre-configured with the function subdirectory;Corresponding second query argument in sql script files is replaced with into the first query argument, obtains corresponding data base querying script.This invention simplifies data base querying process, improve Query Efficiency.
Description
Technical field
The present invention relates to field of software development, more particularly to a kind of electronic installation, data base querying scenario generation method and deposits
Storage media.
Background technology
With the development of internet, the development and application of software are also more and more extensive.And in the exploitation and test of software product
During, in order to ensure that developed content correctly is preserved to database, software developer needs often and data
Storehouse carries out data interaction and the content related to database of not timing is inquired about.
At present, conventional querying method is software developer's data base querying pin according to corresponding to writing inquiry content
This.Although this inquiry mode can inquire required data exactly, because developer is writing corresponding number
After being inquired about according to library inquiry script and to related data, unified management is not carried out to data base querying script, caused
Different development phases in different project development tests or in same project, when data to be checked with inquiring about before
The identical or to be checked data of the data crossed and the data inquired about before can not be obtained quickly when similar on functional attributes
Used data base querying script is taken, used database before many times developer is required for repeating to write
Query script, cause to waste developer's substantial amounts of time and have that data query speed is slow, ineffective problem.
The content of the invention
In view of this, the present invention proposes a kind of electronic installation, database script generation method and storage medium, solves existing
There is the problem of data base querying is comparatively laborious time-consuming in technology, and then simplified data base querying process, improve database
The effect of search efficiency.
First, to achieve the above object, the present invention proposes a kind of electronic installation, the electronic memory and with institute
The processor of memory connection is stated, database script generation program is stored with the memory, the processor is used to perform
The database script generation program stored on the memory, when the database script generates program by the computing device
Realize following steps:
If desired related data query is carried out to database, then generating a data base querying based on data to be checked refers to
Order, and transfers the data base querying template prestored, wherein, the query statement includes the classification, to be checked of data to be checked
Ask functional attributes and first query argument of the data under the classification;
The master catalogue of the data base querying template is traveled through based on the classification, obtains the argument to match with the classification
Each function subdirectory under record and the master catalogue to match;
If there are the functional attributes with the data to be checked under the classification to match in each function subdirectory
Function subdirectory, then obtain the sql script files being pre-configured with the function subdirectory;
Corresponding second query argument in the sql script files is replaced with into first query argument, obtained correspondingly
Data base querying script.
Further, the data base querying script generation sequence by the computing device when also realize following steps:
If each function subdirectory mismatches with the functional attributes of data to be checked in the query statement, send out
Go out corresponding prompt message, writing for data query script is carried out with personnel query corresponding to prompting.
Further, the data base querying template prestored includes at least one selectable master catalogue, is used for
The script viewing area of the field input area of input inquiry parameter and the query script for showing generation, wherein, Ge Gesuo
State and one or more selectable functions subdirectories are corresponding with master catalogue.
Further, the generating process bag of data base querying script described in the data base querying template prestored
Include following steps:
SQLHelper homepages are read, and based on the argument of the local storage script of the SQLHelper building homepages one
Record, wherein, the classification of the title of the master catalogue and the data to be checked matches;
Each function subdirectory is generated under the master catalogue respectively, each function subdirectory is used to deposit sql pin
This document, and in the sql script files deposited respectively with it of the title of each function subdirectory script functional attributes phase
Matching;
By the query script write in software development process respectively according to the functional attributes of script with the shape of sql script files
Formula is synchronously stored in corresponding function subdirectory, obtains the data base querying script in the data base querying template.
Further, the second query argument of dynamic modification is included in the sql script files.
In addition, to achieve the above object, the present invention also provides a kind of data base querying scenario generation method, and this method includes
Following steps:
If desired related data query is carried out to database, then generating a data base querying based on data to be checked refers to
Order, and transfers the data base querying template prestored, wherein, the query statement includes the classification, to be checked of data to be checked
Ask functional attributes and first query argument of the data under the classification;
The master catalogue of the data base querying template is traveled through based on the classification, obtains the argument to match with the classification
Each function subdirectory under record and the master catalogue to match;
If there are the functional attributes with the data to be checked under the classification to match in each function subdirectory
Function subdirectory, then obtain the sql script files being pre-configured with the function subdirectory;
Corresponding second query argument in the sql script files is replaced with into first query argument, obtained correspondingly
Data base querying script.
Further, methods described also comprises the following steps:
If each function subdirectory mismatches with the functional attributes of data to be checked in the query statement, send out
Go out corresponding prompt message, writing for data query script is carried out with personnel query corresponding to prompting.
Further, the data base querying template prestored includes at least one selectable master catalogue, is used for
The script viewing area of the field input area of input inquiry parameter and the query script for showing generation, wherein, Ge Gesuo
State and one or more selectable functions subdirectories are corresponding with master catalogue.
Further, the generating process bag of data base querying script described in the data base querying template prestored
Include following steps:
SQLHelper homepages are read, and based on the argument of the local storage script of the SQLHelper building homepages one
Record, wherein, the classification of the title of the master catalogue and the data to be checked matches;
Each function subdirectory is generated under the master catalogue respectively, each function subdirectory is used to deposit sql pin
This document, and in the sql script files deposited respectively with it of the title of each function subdirectory script functional attributes phase
Matching;
By the query script write in software development process respectively according to the functional attributes of script with the shape of sql script files
Formula is synchronously stored in corresponding function subdirectory, obtains the data base querying script in the data base querying template.
Further, to achieve the above object, the present invention also provides a kind of computer-readable recording medium, the computer
Readable storage medium storing program for executing is stored with data base querying script generation sequence, and the data base querying script generation sequence can be by least one
Individual computing device, so that the step of at least one computing device data base querying scenario generation method described above.
Compared to prior art, electronic installation proposed by the invention, data base querying scenario generation method and storage are situated between
Matter, when needing to carry out related data query to database, a data base querying instruction is generated based on data to be checked, and adjust
Take the data base querying template prestored;The master catalogue of classification ergodic data library inquiry template based on inquiry data, is obtained
Each function subdirectory under master catalogue and the master catalogue that classification with inquiring about data matches;If each function subdirectory
In have the function subdirectory that the functional attributes with data to be checked under the category match, then obtain under the function subdirectory pre-
The sql script files first configured;Corresponding second query argument in sql script files is replaced with into the first query argument, obtained
Corresponding data base querying script, simplify data base querying process, improve Query Efficiency.
Brief description of the drawings
Fig. 1 is the schematic diagram of the hardware structure of electronic installation preferred embodiment proposed by the present invention;
Fig. 2 is that program module corresponding to data base querying script generation sequence is illustrated in the embodiment of electronic installation one of the present invention
Figure;
Fig. 3 is the implementation process diagram of data base querying scenario generation method preferred embodiment of the present invention.
The realization, functional characteristics and advantage of the object of the invention will be described further referring to the drawings in conjunction with the embodiments.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples
The present invention is further elaborated.It should be appreciated that specific embodiment described herein is only to explain the present invention, not
For limiting the present invention.Based on the embodiment in the present invention, those of ordinary skill in the art are not before creative work is made
The every other embodiment obtained is put, belongs to the scope of protection of the invention.
It should be noted that the description for being related to " first ", " second " etc. in the present invention is only used for describing purpose, and can not
It is interpreted as indicating or implies its relative importance or imply the quantity of the technical characteristic indicated by indicating.Thus, define " the
One ", at least one this feature can be expressed or be implicitly included to the feature of " second ".In addition, the skill between each embodiment
Art scheme can be combined with each other, but must can be implemented as basis with those of ordinary skill in the art, when technical scheme
With reference to occurring conflicting or will be understood that the combination of this technical scheme is not present when can not realize, also not in application claims
Protection domain within.
As shown in fig.1, it is the optional hardware structure schematic diagram of electronic installation one proposed by the present invention.In the present embodiment,
Electronic installation 10 can be PC (Personal Computer, PC) or smart mobile phone, tablet personal computer, electronics
The terminal devices such as book reader, pocket computer.
The electronic installation 10 is include but not limited to, memory 101, processor 102, network interface 103 and communication
Bus 104.It is pointed out that Fig. 1 illustrate only the electronic installation 10 with component 101-104, it should be understood that simultaneously
All components shown realistic are not applied, the more or less component of the implementation that can be substituted.
Wherein, memory 101 comprises at least a type of computer-readable recording medium, computer-readable recording medium
Including flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memories etc.), random access storage device (RAM), quiet
State random access storage device (SRAM), read-only storage (ROM), Electrically Erasable Read Only Memory (EEPROM), it can compile
Journey read-only storage (PROM), magnetic storage, disk, CD etc..In certain embodiments, memory 101 can be electronics
The internal storage unit of device 10, such as the hard disk or internal memory of electronic installation 10.In further embodiments, memory 101
It can be the outer packet storage device of electronic installation 10, for example, the plug-in type hard disk being equipped with electronic installation 10, intelligent memory card
(Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..When
So, memory 101 can also both include the internal storage unit of electronic installation 10 or including its outer packet storage device.The present embodiment
In, memory 101 is generally used for the operating system and types of applications software that storage is installed on electronic installation 10, such as database is looked into
Ask program code of script generation sequence etc..In addition, memory 101 can be also used for temporarily storing and export or will
The Various types of data of output.
Processor 102 can be in certain embodiments central processing unit (Central Processing Unit, CPU),
Controller, microcontroller, microprocessor or other data processing chips.Processor 102 is generally used for controlling electronic installation 10
Overall operation.In the present embodiment, processor 102 is used in run memory 101 program code or the processing data stored, example
The program code of the data base querying script generation sequence of such as operation.
Network interface 103 may include radio network interface or wired network interface, and network interface 103 is generally used in electronics
Communication connection is established between device 10 and other electronic equipments.
Communication bus 104 is used to realize the communication connection between component 101-103.
Alternatively, electronic installation 10 can also include user interface, user interface can include display (Display),
Input block such as keyboard (Keyboard), alternatively, user interface can also include wireline interface, the wave point of standard.
Alternatively, in certain embodiments, display can be light-emitting diode display, liquid crystal display, touch-control liquid crystal display and
OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) touches device etc..Wherein, display can also fit
When be referred to as display screen or display unit, for being shown in the letter handled in user's keyword extracting device based on social networks
Cease and for showing visual user interface.
In the electronics embodiment shown in Fig. 1, data base querying script generation sequence is stored with memory 101,
Processor 102 performs the data base querying script generation sequence stored on memory 101.
In one embodiment, following steps are realized when data base querying script generation sequence is performed by processor 102:
A, related data query if desired is carried out to database, then generating a data base querying based on data to be checked refers to
Order, transfers the data base querying template prestored, wherein, query statement includes classification, the data to be checked of data to be checked
Functional attributes and the first query argument under the category;
B, the master catalogue for the data base querying template that the classification traversal based on inquiry data is transferred, obtain and inquiry data
Each function subdirectory under master catalogue that classification matches and the master catalogue to match;
If function for C, thering are the functional attributes with data to be checked under the category to match in each function subdirectory
Catalogue, then obtain the sql script files being pre-configured with the function subdirectory;
D, the second query argument corresponding in acquired sql script l files is replaced with into the first query argument, obtained pair
The data base querying script answered.
It is understood that generally software developer can handle multiple projects, and same project includes multiple exploitations
Stage, in order to meet developer in different projects and can call and prestore in each stage of same project
Data base querying template and generate data base querying script, in the present embodiment, the data base querying template bag prestored
Include and one or more selectable functions subdirectories are corresponding with at least one selectable master catalogue and each master catalogue, are used
In input inquiry parameter field input area and for show generation query script script viewing area.And in this reality
Apply in example, the data base querying instruction based on data to be checked generation includes the classification of data to be checked, data to be checked at this
Functional attributes and the first query argument under classification.For example, data to be checked are:Insured amount value corresponding to certain number of policy is inquired about,
The data category to be checked that then the data base querying instruction based on inquiry data generation includes is declaration form, data to be checked are being protected
Functional attributes under singly are insured amount value and the first query argument is number of policy.
A data base querying instruction is being generated based on data to be checked, and is transferring the data base querying template prestored
Afterwards, the master catalogue of the classification ergodic data library inquiry template based on data to be checked, for example, being based on declaration form ergodic data library inquiry
The master catalogue of template, further, obtain the master catalogue to match with declaration form in master catalogue menu, and under declaration form it is corresponding each
Individual function subdirectory, for example, declaration form sale, declaration form are extended, batch single, declaration form is paid, declaration form is insured amount, declaration form protects information etc. altogether.Can
With understanding, corresponding each function specific item under master catalogue and each master catalogue in the data base querying template prestored
The title of record can by developer according to project need to carry out it is self-defined, in the present embodiment, the title of each master catalogue
Corresponded with the classification of data to be checked, for example, the classification of data to be checked is bank card, then corresponding master catalogue is silver
Row card, and in the sql script files that the title of each function subdirectory is deposited with it respectively under each master catalogue script function
Attribute corresponds.
If there is the function specific item that the functional attributes with data to be checked under the category match in each function subdirectory
Record, for example, function subdirectory declaration form protection amount matches with protection amount, then further obtain what is be pre-configured with the function subdirectory
Sql script files, it is possible to understand that ground, what " script " in sql script files represented is script name, and the script name is by developing
Personnel need to be write according to project, and general script name is not too long, for example, the sql scripts of declaration form extension, declaration form sale
Sql scripts etc., and for the convenience inquired about and obtained, before script name plus sequence number, for example, 01,02 etc, in script
Appearance oneself is write in advance by developer, and includes the second query argument that can dynamically change in content for script, for example, declaration form
Number, insured amount value etc..
Finally, the second query argument is replaced corresponding in the sql scripts that will be pre-configured with the function subdirectory to match
For the first query argument, corresponding data base querying script is obtained.
If it is to be understood that each function subdirectory with the functional attributes of data to be checked in query statement not
Match somebody with somebody, then send corresponding prompt message, writing for data query script is carried out with personnel query corresponding to prompting.
Need further exist for illustrating, the generating process of data base querying script in the data base querying template prestored
Comprise the following steps:
SQLHelper homepages are read, and the master catalogue of script is deposited based on one local of SQLHelper building homepages, its
In, the classification of the title of master catalogue and data to be checked matches;
Each function subdirectory is generated under master catalogue respectively, each function subdirectory is used to deposit sql script files, and
The functional attributes of script match in the sql script files that the title of each function subdirectory is deposited with it respectively;
By the query script write in software development process respectively according to the functional attributes of script with the shape of sql script files
Formula is synchronously stored in corresponding function subdirectory, obtains the query script in data base querying template.
The electronic installation that above-described embodiment proposes, when needing to carry out related data query to database, based on to be checked
Data generate a data base querying instruction, and transfer the data base querying template prestored;Classification based on inquiry data
The master catalogue of ergodic data library inquiry template, obtain under the master catalogue and the master catalogue to match with the classification of inquiry data
Each function subdirectory;If there is the work(that the functional attributes with data to be checked under the category match in each function subdirectory
Energy subdirectory, then obtain the sql script files being pre-configured with the function subdirectory;By in sql script files corresponding second
Query argument replaces with the first query argument, obtains corresponding data base querying script, simplifies data base querying process, improves
Query Efficiency.Explanation is needed further exist for, data base querying script generation sequence is according to its each several part program segment institute
The function of realization is different, can carry out data base querying script generation sequence section with the virtual program module with identical function
Description.
Refer to shown in Fig. 2, be in the embodiment of electronic installation one of the present invention corresponding to data base querying script generation sequence
Program module schematic diagram.In the present embodiment, data base querying script generation sequence, which can be divided into, transfers module 201, first
Matching module 202, the second matching module 203 and replacement module 204.What above-mentioned each program module 201-204 was realized
Function or operating procedure are similar as above, are no longer described in detail herein, exemplarily, such as wherein:
Transfer module 201 to be used to if desired carry out related data query to database, then based on data to be checked generation one
Individual data base querying instruction, and the data base querying template prestored is transferred, wherein, query statement includes data to be checked
The functional attributes and the first query argument of classification, data to be checked under corresponding classification;
First matching module 202 is used for the master catalogue of the classification ergodic data library inquiry template based on data to be checked, obtains
Take each function subdirectory under the master catalogue to match of the classification with data to be checked and the master catalogue to match;
If the second matching module 203 is used in each function subdirectory the work(for having with data to be checked under corresponding classification
The function subdirectory that energy attribute matches, then obtain the sql scripts being pre-configured with the function subdirectory;
Replacement module 204 is used to corresponding second query argument in sql script files replacing with the first query argument, obtains
To corresponding data base querying script.
In addition, the present invention also provides a kind of data base querying scenario generation method.Refer to shown in Fig. 3, be number of the present invention
According to the implementation process diagram of library inquiry scenario generation method preferred embodiment.This method can be performed by a device, the dress
Putting can be realized by software and/or hardware.
In the present embodiment, data base querying scenario generation method includes:
Step S301, related data query if desired is carried out to database, then generate a data based on data to be checked
Library inquiry instructs, and transfers the data base querying template prestored, wherein, query statement includes the classification of data to be checked, treated
Inquire about functional attributes and first query argument of the data under the category;
Step S302, the master catalogue for the data base querying template that the classification traversal based on inquiry data is transferred, obtains and looks into
Each function subdirectory under the classification master catalogue to match for asking data and the master catalogue to match;
Step S303, if having what the functional attributes with data to be checked under the category matched in each function subdirectory
Function subdirectory, then obtain the sql script files being pre-configured with the function subdirectory;
Step S304, corresponding second query argument in acquired sql script files is replaced with into the first query argument,
Data base querying script corresponding to obtaining.
It is understood that generally software developer can handle multiple projects, and same project includes multiple exploitations
Stage, in order to meet developer in different projects and can call and prestore in each stage of same project
Data base querying template and generate data base querying script, in the present embodiment, the data base querying template bag prestored
Include and one or more selectable functions subdirectories are corresponding with at least one selectable master catalogue and each master catalogue, are used
In input inquiry parameter field input area and for show generation query script script viewing area.And in this reality
Apply in example, the data base querying instruction based on data to be checked generation includes the classification of data to be checked, data to be checked at this
Functional attributes and the first query argument under classification.For example, data to be checked are:Insured amount value corresponding to certain number of policy is inquired about,
The data category to be checked that then the data base querying instruction based on inquiry data generation includes is declaration form, data to be checked are being protected
Functional attributes under singly are insured amount value and the first query argument is number of policy.
A data base querying instruction is being generated based on data to be checked, and is transferring the data base querying template prestored
Afterwards, the master catalogue of the classification ergodic data library inquiry template based on data to be checked, for example, being based on declaration form ergodic data library inquiry
The master catalogue of template, further, obtain the master catalogue to match with declaration form in master catalogue menu, and under declaration form it is corresponding each
Individual function subdirectory, for example, declaration form sale, declaration form are extended, batch single, declaration form is paid, declaration form is insured amount, declaration form protects information etc. altogether.Can
With understanding, corresponding each function specific item under master catalogue and each master catalogue in the data base querying template prestored
The title of record can by developer according to project need to carry out it is self-defined, in the present embodiment, the title of each master catalogue
Corresponded with the classification of data to be checked, for example, the classification of data to be checked is bank card, then corresponding master catalogue is silver
Row card, and in the sql script files that the title of each function subdirectory is deposited with it respectively under each master catalogue script function
Attribute corresponds.
If there is the function specific item that the functional attributes with data to be checked under the category match in each function subdirectory
Record, for example, function subdirectory declaration form protection amount matches with protection amount, then further obtain what is be pre-configured with the function subdirectory
Sql script files, it is possible to understand that ground, what " script " in sql script files represented is script name, and the script name is by developing
Personnel need to be write according to project, and general script name is not too long, for example, the sql scripts of declaration form extension, declaration form sale
Sql scripts etc., and for the convenience inquired about and obtained, before script name plus sequence number, for example, 01,02 etc, script
Content oneself is write in advance by developer, and includes the second query argument that can dynamically change in content for script, for example, protecting
Odd numbers, insured amount value etc..
Finally, the second query argument is replaced corresponding in the sql scripts that will be pre-configured with the function subdirectory to match
For the first query argument, corresponding data base querying script is obtained.
If it is to be understood that each function subdirectory with the functional attributes of data to be checked in query statement not
Match somebody with somebody, then send corresponding prompt message, writing for data query script is carried out with personnel query corresponding to prompting.
Need further exist for illustrating, the generating process of data base querying script in the data base querying template prestored
Comprise the following steps:
SQLHelper homepages are read, and the master catalogue of script is deposited based on one local of SQLHelper building homepages, its
In, the classification of the title of master catalogue and data to be checked matches;
Each function subdirectory is generated under master catalogue respectively, each function subdirectory is used to deposit sql script files, and
The functional attributes of script match in the sql script files that the title of each function subdirectory is deposited with it respectively;
By the query script write in software development process respectively according to the functional attributes of script with the shape of sql script files
Formula is synchronously stored in corresponding function subdirectory, obtains the query script in data base querying template.
The data base querying scenario generation method that above-described embodiment proposes, needing to carry out related data query to database
When, a data base querying instruction is generated based on data to be checked, and transfer the data base querying template prestored;Based on looking into
Ask the master catalogue of the classification ergodic data library inquiry template of data, obtain with the master catalogue that matches of classification of inquiry data and
Each function subdirectory under the master catalogue;If there is the function category under the category with data to be checked in each function subdirectory
The function subdirectory that property matches, then obtain the sql script files being pre-configured with the function subdirectory;By sql script files
In corresponding to the second query argument replace with the first query argument, obtain corresponding to data base querying script, simplify database
Query process, improve Query Efficiency.
In addition, the embodiment of the present invention also proposes a kind of computer-readable recording medium, on the computer-readable recording medium
Data base querying script generation sequence is stored with, following behaviour is realized when the data base querying script generation sequence is executed by processor
Make:
If desired related data query is carried out to database, then generating a data base querying based on data to be checked refers to
Order, and the data base querying template prestored is transferred, wherein, query statement includes the classification of data to be checked, number to be checked
According to the functional attributes under the classification of data to be checked and the first query argument;
Based on the master catalogue of the classification ergodic data library inquiry template, obtain what is matched with the classification of data to be checked
Each function subdirectory under master catalogue and the master catalogue to match;
If there are the functional attributes with data to be checked under the classification of data to be checked to match in each function subdirectory
Function subdirectory, then obtain the sql script files being pre-configured with the function subdirectory;
Corresponding second query argument in sql script files is replaced with into the first query argument, obtains corresponding database
Query script.
Further, following steps are also realized when data base querying script generation sequence is executed by processor:
If each function subdirectory mismatches with the functional attributes of data to be checked in query statement, send corresponding
Prompt message, writing for data query script is carried out with personnel query corresponding to prompting.
Further, the data base querying template prestored includes:Master catalogue, corresponding each work(under each master catalogue
Can subdirectory, the field input area for input inquiry parameter and the script viewing area for showing generation query script
Domain.
Further, the generating process of data base querying script includes following step in the data base querying template prestored
Suddenly:
SQLHelper homepages are read, and the master catalogue of script is deposited based on one local of SQLHelper building homepages, its
In, the classification of the title of master catalogue and data to be checked matches;
Each function subdirectory is generated under master catalogue respectively, each function subdirectory is used to deposit sql script files, and
The functional attributes of script match in the sql script files that the title of each function subdirectory is deposited with it respectively;
By the query script write in software development process respectively according to the functional attributes of script with the shape of sql script files
Formula is synchronously stored in corresponding function subdirectory, obtains the data base querying script in data base querying template.
Computer-readable recording medium embodiment proposed by the present invention and above-mentioned electronic installation and data base querying
Each embodiment of scenario generation method is essentially identical, does not make tired state herein.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words
Going out the part of contribution can be embodied in the form of software product, and the computer software product is stored in a storage medium
In (such as ROM/RAM, magnetic disc, CD), including some instructions to cause a station terminal equipment (can be mobile phone, computer, clothes
Be engaged in device, air conditioner, or network equipment etc.) perform method described in each embodiment of the present invention.
The preferred embodiments of the present invention are these are only, are not intended to limit the scope of the invention, it is every to utilize this hair
The equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skills
Art field, is included within the scope of the present invention.
Claims (10)
1. a kind of electronic installation, it is characterised in that the electronic installation includes memory and the processing being connected with the memory
Device, data base querying script generation sequence is stored with the memory, and the processor is used to perform to deposit on the memory
The data base querying script generation sequence of storage, the data base querying script generation sequence are realized such as during the computing device
Lower step:
If desired related data query is carried out to database, then generates a data base querying instruction based on data to be checked, and
The data base querying template prestored is transferred, wherein, the query statement includes classification, the data to be checked of data to be checked
Functional attributes and the first query argument under the classification;
The master catalogue of the data base querying template is traveled through based on the classification, obtain match with the classification master catalogue,
And each function subdirectory under the master catalogue to match;
If there is the work(that the functional attributes with the data to be checked under the classification match in each function subdirectory
Energy subdirectory, then obtain the sql script files being pre-configured with the function subdirectory;
Corresponding second query argument in the sql script files is replaced with into first query argument, obtains corresponding number
According to library inquiry script.
2. electronic installation as claimed in claim 1, it is characterised in that the data base querying script generation sequence is by the place
Reason device also realizes following steps when performing:
If each function subdirectory mismatches with the functional attributes of data to be checked in the query statement, send pair
The prompt message answered, writing for data query script is carried out with personnel query corresponding to prompting.
3. electronic installation as claimed in claim 1, it is characterised in that the data base querying template prestored is included extremely
Lack a selectable master catalogue, the field input area for input inquiry parameter and for showing the query script generated
Script viewing area, wherein, one or more selectable functions subdirectories are corresponding with each master catalogue.
4. electronic installation as claimed in claim 3, it is characterised in that described in the data base querying template prestored
The generating process of data base querying script comprises the following steps:
SQLHelper homepages are read, and the master catalogue of script is locally deposited based on the SQLHelper building homepages one, its
In, the classification of the title of the master catalogue and the data to be checked matches;
Each function subdirectory is generated under the master catalogue respectively, each function subdirectory is used to deposit sql scripts text
Part, and the functional attributes of script match in the sql script files deposited respectively with it of the title of each function subdirectory;
By the query script write in software development process respectively according to the functional attributes of script in the form of sql script files it is same
Step is stored in corresponding function subdirectory, obtains the data base querying script in the data base querying template.
5. the electronic installation as described in claim any one of 1-4, it is characterised in that dynamic is included in the sql script files
Second query argument of modification.
6. a kind of data base querying scenario generation method, it is characterised in that methods described comprises the following steps:
If desired related data query is carried out to database, then generates a data base querying instruction based on data to be checked, and
The data base querying template prestored is transferred, wherein, the query statement includes classification, the data to be checked of data to be checked
Functional attributes and the first query argument under the classification;
The master catalogue of the data base querying template is traveled through based on the classification, obtain match with the classification master catalogue,
And each function subdirectory under the master catalogue to match;
If there is the work(that the functional attributes with the data to be checked under the classification match in each function subdirectory
Energy subdirectory, then obtain the sql script files being pre-configured with the function subdirectory;
Corresponding second query argument in the sql script files is replaced with into first query argument, obtains corresponding number
According to library inquiry script.
7. data base querying scenario generation method as claimed in claim 6, it is characterised in that methods described also includes following step
Suddenly:
If each function subdirectory mismatches with the functional attributes of data to be checked in the query statement, send pair
The prompt message answered, writing for data query script is carried out with personnel query corresponding to prompting.
8. data base querying scenario generation method as claimed in claim 6, it is characterised in that the database prestored
Query template includes at least one selectable master catalogue, the field input area for input inquiry parameter and for showing
The script viewing area of query script is generated, wherein, it is corresponding with one or more selectable functions under each master catalogue
Subdirectory.
9. data base querying scenario generation method as claimed in claim 8, it is characterised in that the database prestored
The generating process of data base querying script described in query template comprises the following steps:
SQLHelper homepages are read, and the master catalogue of script is locally deposited based on the SQLHelper building homepages one, its
In, the classification of the title of the master catalogue and the data to be checked matches;
Each function subdirectory is generated under the master catalogue respectively, each function subdirectory is used to deposit sql scripts text
Part, and the functional attributes of script match in the sql script files deposited respectively with it of the title of each function subdirectory;
By the query script write in software development process respectively according to the functional attributes of script in the form of sql script files it is same
Step is stored in corresponding function subdirectory, obtains the data base querying script in the data base querying template.
10. a kind of computer-readable recording medium, the computer-readable recording medium storage has the generation of data base querying script
Program, the data base querying script generation sequence can be by least one computing devices, so that at least one processor
The step of performing the data base querying scenario generation method as any one of claim 6-9.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710929614.1A CN107844519A (en) | 2017-10-09 | 2017-10-09 | Electronic installation, data base querying scenario generation method and storage medium |
PCT/CN2018/076183 WO2019071898A1 (en) | 2017-10-09 | 2018-02-10 | Electronic device, database query script generation method and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710929614.1A CN107844519A (en) | 2017-10-09 | 2017-10-09 | Electronic installation, data base querying scenario generation method and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107844519A true CN107844519A (en) | 2018-03-27 |
Family
ID=61662280
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710929614.1A Pending CN107844519A (en) | 2017-10-09 | 2017-10-09 | Electronic installation, data base querying scenario generation method and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107844519A (en) |
WO (1) | WO2019071898A1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109445768A (en) * | 2018-09-28 | 2019-03-08 | 平安科技(深圳)有限公司 | Database script generation method, device, computer equipment and storage medium |
CN110413630A (en) * | 2018-08-27 | 2019-11-05 | 上海纵坤信息技术有限公司 | Examination criteria searching system and method |
CN112287021A (en) * | 2020-07-13 | 2021-01-29 | 上海柯林布瑞信息技术有限公司 | Data real-time synchronization parameter generation method, data real-time synchronization parameter synchronization method, data real-time synchronization parameter generation device, data real-time synchronization parameter synchronization device, storage medium and terminal |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112148392A (en) * | 2019-06-27 | 2020-12-29 | 腾讯科技(深圳)有限公司 | Function call chain acquisition method and device and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050038630A1 (en) * | 2003-08-13 | 2005-02-17 | Oracle International Corporation | Layout aware calculations |
CN102193922A (en) * | 2010-03-04 | 2011-09-21 | 杭州华三通信技术有限公司 | Method and device for accessing database |
CN102622215A (en) * | 2011-01-27 | 2012-08-01 | 腾讯科技(深圳)有限公司 | Method for editing image-text units based on script |
CN104809254A (en) * | 2015-05-19 | 2015-07-29 | 郑州悉知信息技术有限公司 | Data query method and device |
CN105630472A (en) * | 2014-11-03 | 2016-06-01 | 中国科学院沈阳自动化研究所 | Quick client development frame for manufacturing execution system and software development method for frame |
CN106202322A (en) * | 2016-06-30 | 2016-12-07 | 乐视控股(北京)有限公司 | A kind of page generation method and device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101788996A (en) * | 2009-11-19 | 2010-07-28 | 山东浪潮齐鲁软件产业股份有限公司 | User-defined searching method |
CN105224544A (en) * | 2014-05-30 | 2016-01-06 | 北大方正集团有限公司 | A kind of data editing method of database and device |
-
2017
- 2017-10-09 CN CN201710929614.1A patent/CN107844519A/en active Pending
-
2018
- 2018-02-10 WO PCT/CN2018/076183 patent/WO2019071898A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050038630A1 (en) * | 2003-08-13 | 2005-02-17 | Oracle International Corporation | Layout aware calculations |
CN102193922A (en) * | 2010-03-04 | 2011-09-21 | 杭州华三通信技术有限公司 | Method and device for accessing database |
CN102622215A (en) * | 2011-01-27 | 2012-08-01 | 腾讯科技(深圳)有限公司 | Method for editing image-text units based on script |
CN105630472A (en) * | 2014-11-03 | 2016-06-01 | 中国科学院沈阳自动化研究所 | Quick client development frame for manufacturing execution system and software development method for frame |
CN104809254A (en) * | 2015-05-19 | 2015-07-29 | 郑州悉知信息技术有限公司 | Data query method and device |
CN106202322A (en) * | 2016-06-30 | 2016-12-07 | 乐视控股(北京)有限公司 | A kind of page generation method and device |
Non-Patent Citations (1)
Title |
---|
朱先忠: "《ASP.NET3.5》", 30 June 2010 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110413630A (en) * | 2018-08-27 | 2019-11-05 | 上海纵坤信息技术有限公司 | Examination criteria searching system and method |
CN109445768A (en) * | 2018-09-28 | 2019-03-08 | 平安科技(深圳)有限公司 | Database script generation method, device, computer equipment and storage medium |
CN109445768B (en) * | 2018-09-28 | 2022-02-11 | 平安科技(深圳)有限公司 | Database script generation method and device, computer equipment and storage medium |
CN112287021A (en) * | 2020-07-13 | 2021-01-29 | 上海柯林布瑞信息技术有限公司 | Data real-time synchronization parameter generation method, data real-time synchronization parameter synchronization method, data real-time synchronization parameter generation device, data real-time synchronization parameter synchronization device, storage medium and terminal |
CN112287021B (en) * | 2020-07-13 | 2024-04-05 | 上海柯林布瑞信息技术有限公司 | Method and device for generating and synchronizing real-time data synchronization parameters, storage medium and terminal |
Also Published As
Publication number | Publication date |
---|---|
WO2019071898A1 (en) | 2019-04-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7991800B2 (en) | Object oriented system and method for optimizing the execution of marketing segmentations | |
CN107844519A (en) | Electronic installation, data base querying scenario generation method and storage medium | |
CN109542445A (en) | A kind of method and apparatus that Android plug-in unit melts hair | |
CN104516738A (en) | Integrated implementing method for development and release of APP | |
CN107357593A (en) | Source code file construction method, device, electric terminal and readable storage medium storing program for executing | |
CN105893097A (en) | Method and device for processing option information of BIOS (basic input output system) | |
CN102355499B (en) | Cloud computing system | |
US20200065313A1 (en) | Extensible content object metadata | |
CN108846753A (en) | Method and apparatus for handling data | |
CN110019080A (en) | Data access method and device | |
CN108196876A (en) | PHP business collocation methods and central server based on file | |
CN107656729A (en) | Updating device, method and the computer-readable recording medium of List View | |
CN107797820A (en) | Method and apparatus for generating patch | |
CN108363684A (en) | List creation method, device and server | |
CN108874464A (en) | Middleware automatically scanning assembly method, device and storage medium | |
CN107679066A (en) | Project information methods of exhibiting, electronic installation and computer-readable recording medium | |
CN109614565A (en) | Webpage generating method and device | |
CN103617055B (en) | A kind of method, apparatus and browser for starting application program in a browser | |
CN106600082A (en) | Processing method and device of task in service system, and service system construction system | |
CN109491962A (en) | A kind of file directory tree management method and relevant apparatus | |
CN1647040A (en) | Method and system for managing a computer system | |
CN109767098A (en) | Processing method, device, computer equipment and the storage medium of product attribute | |
CN106371706A (en) | Method and device for site selection of application shortcuts | |
US9373093B2 (en) | Gateway service manager for business object applications | |
CN106599241A (en) | Big data visual management method for GIS software |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180327 |