WO2019071898A1 - Electronic device, database query script generation method and storage medium - Google Patents

Electronic device, database query script generation method and storage medium Download PDF

Info

Publication number
WO2019071898A1
WO2019071898A1 PCT/CN2018/076183 CN2018076183W WO2019071898A1 WO 2019071898 A1 WO2019071898 A1 WO 2019071898A1 CN 2018076183 W CN2018076183 W CN 2018076183W WO 2019071898 A1 WO2019071898 A1 WO 2019071898A1
Authority
WO
WIPO (PCT)
Prior art keywords
query
function
script
database query
data
Prior art date
Application number
PCT/CN2018/076183
Other languages
French (fr)
Chinese (zh)
Inventor
高梁梁
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019071898A1 publication Critical patent/WO2019071898A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • G06F16/2445Data retrieval commands; View definitions

Definitions

  • the present application relates to the field of software development, and in particular, to an electronic device, a database query script generation method, and a storage medium.
  • the commonly used query method is that the software developer writes a corresponding database query script according to the query content.
  • this kind of query method can accurately query the required data, since the developer writes the corresponding database query script and queries the related data, the database query script is not uniformly managed, resulting in different project development.
  • the used data cannot be quickly obtained.
  • Database query scripts many times developers need to repeatedly write database query scripts that have been used before, resulting in wasted developers a lot of time, and the problem of slow data query and low efficiency.
  • the present application provides an electronic device, a database script generation method, and a storage medium, which solves the problem that the database query in the prior art is cumbersome and time consuming, thereby achieving the effect of simplifying the database query process and improving the database query efficiency.
  • a first aspect of the present application provides an electronic device, a memory of the electronic device, and a processor connected to the memory, where the memory stores a database script generating program, where the processor is used to Executing a database script generation program stored on the memory, the database script generation program being executed by the processor to implement the following steps:
  • the database needs to perform related data query, generate a database query instruction based on the data to be queried, and retrieve a pre-stored database query template, where the query instruction includes a category of the data to be queried, and the data to be queried is in the category.
  • Functional attributes, and first query parameters
  • the function sub-directory has a function sub-directory that matches the function attribute of the to-be-queried data in the category, the pre-configured sql script file in the function sub-directory is obtained;
  • the corresponding second query parameter in the sql script file is replaced with the first query parameter, and a corresponding database query script is obtained.
  • the second aspect of the present application further provides a database query script generating method, where the method includes the following steps:
  • the database needs to perform related data query, generate a database query instruction based on the data to be queried, and retrieve a pre-stored database query template, where the query instruction includes a category of the data to be queried, and the data to be queried is in the category.
  • Functional attributes, and first query parameters
  • the function sub-directory has a function sub-directory that matches the function attribute of the to-be-queried data in the category, the pre-configured sql script file in the function sub-directory is obtained;
  • the corresponding second query parameter in the sql script file is replaced with the first query parameter, and a corresponding database query script is obtained.
  • a third aspect of the present application further provides a computer readable storage medium storing a database query script generating program, where the database query script generating program can be processed by at least one Executing to cause the at least one processor to perform the following steps:
  • the database needs to perform related data query, generate a database query instruction based on the data to be queried, and retrieve a pre-stored database query template, where the query instruction includes a category of the data to be queried, and the data to be queried is in the category.
  • Functional attributes, and first query parameters
  • the function sub-directory has a function sub-directory that matches the function attribute of the to-be-queried data in the category, the pre-configured sql script file in the function sub-directory is obtained;
  • the corresponding second query parameter in the sql script file is replaced with the first query parameter, and a corresponding database query script is obtained.
  • the electronic device, the database query script generating method and the storage medium proposed by the present application generate a database query instruction based on the data to be queried when the related data query needs to be performed on the database, and retrieve the pre-stored a database query template; traversing the home directory of the database query template based on the category of the query data, obtaining a home directory matching the category of the query data, and each function subdirectory under the home directory; if each function subdirectory has and is to be queried If the function sub-directory of the data in the category matches the function sub-directory, the pre-configured sql script file in the function sub-directory is obtained; the corresponding second query parameter in the sql script file is replaced with the first query parameter, and the corresponding
  • the database query script simplifies the database query process and improves the database query efficiency.
  • FIG. 1 is a schematic diagram of a hardware architecture of a preferred embodiment of an electronic device proposed by the present application
  • FIG. 2 is a schematic diagram of a program module corresponding to a database query script generation program in an embodiment of an electronic device of the present application
  • FIG. 3 is a schematic diagram of an implementation process of a preferred embodiment of a method for generating a database query script according to the present application.
  • first, second and the like in the present application are for the purpose of description only, and are not to be construed as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. .
  • features defining “first” and “second” may include at least one of the features, either explicitly or implicitly.
  • the technical solutions between the various embodiments may be combined with each other, but must be based on the realization of those skilled in the art, and when the combination of the technical solutions is contradictory or impossible to implement, it should be considered that the combination of the technical solutions does not exist. Nor is it within the scope of protection required by this application.
  • the electronic device 10 may be a PC (Personal Computer), or may be a terminal device such as a smart phone, a tablet computer, an e-book reader, or a portable computer.
  • PC Personal Computer
  • a terminal device such as a smart phone, a tablet computer, an e-book reader, or a portable computer.
  • the electronic device 10 includes, but is not limited to, a memory 101, a processor 102, a network interface 103, and a communication bus 104. It should be noted that FIG. 1 only shows the electronic device 10 having the components 101-104, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
  • the memory 101 includes at least one type of computer readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), a random access memory (RAM), and a static Random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like.
  • the memory 101 can be an internal storage unit of the electronic device 10, such as a hard disk or memory of the electronic device 10.
  • the memory 101 may also be an outsourced storage device of the electronic device 10, such as a plug-in hard disk equipped on the electronic device 10, a smart memory card (SMC), and a secure digital (Secure Digital, SD) ) cards, flash cards, etc.
  • the memory 101 can also include both an internal storage unit of the electronic device 10 and an outsourced storage device thereof.
  • the memory 101 is generally used to store an operating system installed in the electronic device 10 and various types of application software, such as program code of a database query script generating program. Further, the memory 101 can also be used to temporarily store various types of data that have been output or are to be output.
  • Processor 102 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments.
  • the processor 102 is typically used to control the overall operation of the electronic device 10.
  • the processor 102 is configured to run program code or processing data stored in the memory 101, such as a program code of a running database query script generating program.
  • the network interface 103 can include a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the electronic device 10 and other electronic devices.
  • Communication bus 104 is used to implement a communication connection between components 101-103.
  • the electronic device 10 may further include a user interface, and the user interface may include a display, an input unit such as a keyboard, and optionally, the user interface may further include a standard wired interface and a wireless interface.
  • the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch sensor, or the like.
  • the display may also be suitably referred to as a display screen or display unit for displaying information processed in the social network based user keyword extraction device and a user interface for displaying visualization.
  • a memory query script generation program is stored in the memory 101, and the processor 102 executes a database query script generation program stored in the memory 101.
  • the database query script generation program is executed by the processor 102 to implement the following steps:
  • a database query instruction is generated based on the data to be queried, and a pre-stored database query template is retrieved, wherein the query instruction includes a category of the data to be queried, and the data to be queried is in the category.
  • each function subdirectory has a function subdirectory that matches the function attribute of the data to be queried in the category, obtain a pre-configured sql script file in the function subdirectory;
  • the template generates a database query script.
  • the pre-stored database query template includes at least one selectable home directory, and each home directory corresponds to one or more selectable function subdirectories for inputting a query.
  • the field input area of the parameter and the script display area for displaying the generated query script.
  • the database query instruction generated based on the data to be queried includes a category of data to be queried, a function attribute of the data to be queried under the category, and a first query parameter.
  • the data to be queried is: querying the insured value corresponding to a policy number, and the data query to be queried according to the database query instruction generated by the query data is a policy, and the function attribute of the data to be queried under the policy is a forbidden value, And the first query parameter is the policy number.
  • each home directory The name of the data to be queried corresponds to the category of the data to be queried. For example, if the category of the data to be queried is a bank card, the corresponding home directory is a bank card, and the names of the respective functional subdirectories under each home directory are respectively associated with the sql stored therein.
  • the function attributes of the scripts in the script file correspond one-to-one.
  • the "script" in the sql script file represents the script name
  • the script name is written by the developer according to the project needs
  • the general script name is not too long, for example, the policy extension sql script, policy Sales of sql scripts, etc., and for the convenience of query and access, add a sequence number in front of the script name, for example, 01, 02, etc.
  • the script content is written by the developer in advance, and the script content contains dynamically modified Second, query parameters, such as policy number, insured value, and so on.
  • process of generating a database query script in a pre-stored database query template includes the following steps:
  • Each function subdirectory is generated in the main directory, and each function subdirectory is used to store the sql script file, and the names of the respective function subdirectories are respectively matched with the function attributes of the script in the sql script file stored therein;
  • the query scripts written in the software development process are synchronously stored in the corresponding function subdirectories in the form of sql script files according to the function attributes of the scripts, and the query scripts in the database query template are obtained.
  • the electronic device proposed by the foregoing embodiment generates a database query instruction based on the data to be queried when the related data query needs to be performed, and retrieves a pre-stored database query template; traverses the home directory of the database query template based on the category of the query data. , obtaining a home directory matching the category of the query data, and each function subdirectory under the home directory; if each function subdirectory has a function subdirectory matching the function attribute of the data to be queried under the category, Obtain the pre-configured sql script file in the function subdirectory; replace the corresponding second query parameter in the sql script file with the first query parameter, and obtain the corresponding database query script, which simplifies the database query process and improves the database query efficiency.
  • the database query script generation program may describe the database query script generation program segment by using a virtual program module having the same function according to different functions implemented by each part of the program segment.
  • FIG. 2 is a schematic diagram of a program module corresponding to a database query script generation program in an embodiment of the electronic device of the present application.
  • the database query script generating program may be divided into a calling module 201, a first matching module 202, a second matching module 203, and a replacement module 204.
  • the functions or operational steps implemented by the respective program modules 201-204 described above are similar to the above, and are not described in detail herein, by way of example, for example:
  • the retrieving module 201 is configured to generate a database query instruction based on the data to be queried, and retrieve a pre-stored database query template, where the query instruction includes the category of the data to be queried and the data to be queried. a function attribute under the corresponding category, and a first query parameter;
  • the first matching module 202 is configured to traverse the main directory of the database query template based on the category of the data to be queried, obtain a main directory that matches the category of the data to be queried, and each functional subdirectory under the matching main directory;
  • the second matching module 203 is configured to obtain a pre-configured sql script in the function sub-directory if there is a function sub-directory in each function sub-directory that matches the function attribute of the data to be queried in the corresponding category;
  • the replacement module 204 is configured to replace the corresponding second query parameter in the sql script file with the first query parameter to obtain a corresponding database query script.
  • FIG. 3 is a schematic flowchart of an implementation process of a preferred embodiment of a database query script generation method.
  • the method can be performed by a device that can be implemented by software and/or hardware.
  • the database query script generation method includes:
  • Step S301 If a related data query is required to be performed on the database, generate a database query instruction based on the data to be queried, and retrieve a pre-stored database query template, where the query instruction includes a category of the data to be queried, and the data to be queried is in the category.
  • Functional attributes, and first query parameters
  • Step S302 traversing the home directory of the retrieved database query template based on the category of the query data, obtaining a home directory matching the category of the query data, and each function subdirectory under the matching home directory;
  • Step S303 if there is a function sub-directory in the function sub-directory that matches the function attribute of the data to be queried in the category, the pre-configured sql script file in the function sub-directory is obtained;
  • Step S304 replacing the corresponding second query parameter in the obtained sql script file with the first query parameter, to obtain a corresponding database query script.
  • the template generates a database query script.
  • the pre-stored database query template includes at least one selectable home directory, and each home directory corresponds to one or more selectable function subdirectories for inputting a query.
  • the field input area of the parameter and the script display area for displaying the generated query script.
  • the database query instruction generated based on the data to be queried includes a category of data to be queried, a function attribute of the data to be queried under the category, and a first query parameter.
  • the data to be queried is: querying the insured value corresponding to a policy number, and the data query to be queried according to the database query instruction generated by the query data is a policy, and the function attribute of the data to be queried under the policy is a forbidden value, And the first query parameter is the policy number.
  • each home directory The name of the data to be queried corresponds to the category of the data to be queried. For example, if the category of the data to be queried is a bank card, the corresponding home directory is a bank card, and the names of the respective functional subdirectories under each home directory are respectively associated with the sql stored therein.
  • the function attributes of the scripts in the script file correspond one-to-one.
  • the "script" in the sql script file represents the script name
  • the script name is written by the developer according to the project needs
  • the general script name is not too long, for example, the policy extension sql script, policy Sales of sql scripts, etc., and for the convenience of query and access, add a sequence number in front of the script name, for example, 01, 02, etc.
  • the script content is written by the developer in advance, and the script content contains dynamically modified
  • the second query parameter for example, the policy number, the insured value, and the like.
  • process of generating a database query script in a pre-stored database query template includes the following steps:
  • Each function subdirectory is generated in the main directory, and each function subdirectory is used to store the sql script file, and the names of the respective function subdirectories are respectively matched with the function attributes of the scripts in the sql script file stored therein;
  • the query scripts written in the software development process are synchronously stored in the corresponding function subdirectories in the form of sql script files according to the function attributes of the scripts, and the query scripts in the database query template are obtained.
  • the database query script generation method proposed by the foregoing embodiment generates a database query instruction based on the data to be queried when the related data query needs to be performed, and retrieves a pre-stored database query template; traverses the database query template based on the category of the query data.
  • the home directory the home directory matching the category of the query data, and the function subdirectories under the home directory; if each function subdirectory has a function that matches the function attribute of the data to be queried under the category
  • the directory obtains the pre-configured sql script file in the function subdirectory; replaces the corresponding second query parameter in the sql script file with the first query parameter, and obtains the corresponding database query script, which simplifies the database query process and improves the database query. effectiveness.
  • the embodiment of the present application further provides a computer readable storage medium, where the database readable storage medium is stored with a database query script generating program, and the database query script generating program is executed by the processor to:
  • the database needs to perform related data query, generate a database query instruction based on the data to be queried, and retrieve a pre-stored database query template, wherein the query instruction includes a category of the data to be queried, and the data to be queried is in the category of the data to be queried.
  • Functional attributes, and first query parameters
  • the corresponding second query parameter in the sql script file is replaced with the first query parameter to obtain a corresponding database query script.
  • the corresponding prompt information is sent to remind the corresponding query personnel to write the data query script.
  • the pre-stored database query template includes: a main directory, corresponding function sub-directories under each main directory, a field input area for inputting query parameters, and a script display area for displaying a generated query script.
  • the process of generating the database query script in the pre-stored database query template includes the following steps:
  • Each function subdirectory is generated in the main directory, and each function subdirectory is used to store the sql script file, and the names of the respective function subdirectories are respectively matched with the function attributes of the scripts in the sql script file stored therein;
  • the query scripts written in the software development process are synchronously stored in the corresponding function subdirectories in the form of sql script files according to the function attributes of the scripts, and the database query scripts in the database query template are obtained.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.

Abstract

An electronic device, a database query script generation method and a storage medium. The method comprises: when a relevant data query needs to be performed on a database, generating one database query instruction based on data to be queried, and retrieving a pre-stored database query template (S301); traversing main directories of the database query template based on a category of the data to be queried, so as to acquire a main directory matching the category of the data to be queried and various function sub-directories under the matched main directory (S302); if a function sub-directory matching a function attribute of the data to be queried under the category of the data to be queried exists in the function sub-directories, acquiring a pre-configured sql script file under the function sub-directory (S303); and replacing a corresponding second query parameter in the sql script file with a first query parameter, so as to obtain a corresponding database query script (S304). The method simplifies the database query process, and improves database query efficiency.

Description

电子装置、数据库查询脚本生成方法及存储介质Electronic device, database query script generation method and storage medium
本申请要求于2017年10月9日提交中国专利局、申请号为201710929614.1,发明名称为“电子装置、数据库查询脚本生成方法及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to Chinese Patent Application No. 200910929614.1, entitled "Electronic Device, Database Query Script Generation Method and Storage Medium", which is filed on October 9, 2017, the entire contents of which are incorporated by reference. In this application.
技术领域Technical field
本申请涉软件开发领域,尤其涉及一种电子装置、数据库查询脚本生成方法及存储介质。The present application relates to the field of software development, and in particular, to an electronic device, a database query script generation method, and a storage medium.
背景技术Background technique
随着互联网的发展,软件的开发应用也越来越广泛。而在软件产品的开发及测试过程中,为了保证所开发的内容正确无误地保存至数据库,软件开发人员需要经常与数据库进行数据交互并不定时的对数据库相关的内容进行查询。With the development of the Internet, the development and application of software has become more and more extensive. In the process of software product development and testing, in order to ensure that the developed content is correctly saved to the database, the software developer needs to frequently interact with the database for data and query the database-related content from time to time.
目前,常用的查询方法是软件开发人员根据查询内容编写对应的数据库查询脚本。这种查询方式虽然能够准确地查询到所需的数据,但是由于开发人员在撰写相应的数据库查询脚本并对相关数据进行查询之后,对数据库查询脚本没有进行统一的管理,导致在不同的项目开发测试中、或者在同一项目的不同开发阶段,当待查询的数据与之前查询过的数据相同、或者待查询的数据与之前查询过的数据在功能属性上类似时,无法快速获取已使用过的数据库查询脚本,很多时候开发人员都需要重复编写之前已使用过的数据库查询脚本,导致浪费开发人员大量的时间、且存在数据查询速度慢、工作效率低的问题。At present, the commonly used query method is that the software developer writes a corresponding database query script according to the query content. Although this kind of query method can accurately query the required data, since the developer writes the corresponding database query script and queries the related data, the database query script is not uniformly managed, resulting in different project development. During the test, or in different development stages of the same project, when the data to be queried is the same as the previously queried data, or the data to be queried is similar to the previously queried data in the functional attributes, the used data cannot be quickly obtained. Database query scripts, many times developers need to repeatedly write database query scripts that have been used before, resulting in wasted developers a lot of time, and the problem of slow data query and low efficiency.
发明内容Summary of the invention
有鉴于此,本申请提出一种电子装置、数据库脚本生成方法及存储介质, 解决了现有技术中数据库查询比较繁琐耗时的问题,进而达到了简化数据库查询过程、提高数据库查询效率的效果。In view of this, the present application provides an electronic device, a database script generation method, and a storage medium, which solves the problem that the database query in the prior art is cumbersome and time consuming, thereby achieving the effect of simplifying the database query process and improving the database query efficiency.
首先,为实现上述目的,本申请第一方面提出一种电子装置,所述电子装置存储器、及与所述存储器连接的处理器,所述存储器上存储有数据库脚本生成程序,所述处理器用于执行所述存储器上存储的数据库脚本生成程序,所述数据库脚本生成程序被所述处理器执行时实现如下步骤:First, in order to achieve the above object, a first aspect of the present application provides an electronic device, a memory of the electronic device, and a processor connected to the memory, where the memory stores a database script generating program, where the processor is used to Executing a database script generation program stored on the memory, the database script generation program being executed by the processor to implement the following steps:
若需要对数据库进行相关数据查询,则基于待查询数据生成一个数据库查询指令,并调取预先存储的数据库查询模板,其中,所述查询指令包括待查询数据的类别、待查询数据在所述类别下的功能属性、以及第一查询参数;If the database needs to perform related data query, generate a database query instruction based on the data to be queried, and retrieve a pre-stored database query template, where the query instruction includes a category of the data to be queried, and the data to be queried is in the category. Functional attributes, and first query parameters;
基于所述类别遍历所述数据库查询模板的主目录,获取与所述类别相匹配的主目录、及所述相匹配的主目录下的各个功能子目录;Traversing the main directory of the database query template based on the category, acquiring a home directory matching the category, and each function subdirectory under the matching home directory;
若所述各个功能子目录中有与所述待查询数据在所述类别下的功能属性相匹配的功能子目录,则获取该功能子目录下预先配置的sql脚本文件;If the function sub-directory has a function sub-directory that matches the function attribute of the to-be-queried data in the category, the pre-configured sql script file in the function sub-directory is obtained;
将所述sql脚本文件中对应的第二查询参数替换为所述第一查询参数,得到对应的数据库查询脚本。The corresponding second query parameter in the sql script file is replaced with the first query parameter, and a corresponding database query script is obtained.
此外,为实现上述目的,本申请第二方面还提供一种数据库查询脚本生成方法,该方法包括如下步骤:In addition, in order to achieve the above object, the second aspect of the present application further provides a database query script generating method, where the method includes the following steps:
若需要对数据库进行相关数据查询,则基于待查询数据生成一个数据库查询指令,并调取预先存储的数据库查询模板,其中,所述查询指令包括待查询数据的类别、待查询数据在所述类别下的功能属性、以及第一查询参数;If the database needs to perform related data query, generate a database query instruction based on the data to be queried, and retrieve a pre-stored database query template, where the query instruction includes a category of the data to be queried, and the data to be queried is in the category. Functional attributes, and first query parameters;
基于所述类别遍历所述数据库查询模板的主目录,获取与所述类别相匹配的主目录、及所述相匹配的主目录下的各个功能子目录;Traversing the main directory of the database query template based on the category, acquiring a home directory matching the category, and each function subdirectory under the matching home directory;
若所述各个功能子目录中有与所述待查询数据在所述类别下的功能属性相匹配的功能子目录,则获取该功能子目录下预先配置的sql脚本文件;If the function sub-directory has a function sub-directory that matches the function attribute of the to-be-queried data in the category, the pre-configured sql script file in the function sub-directory is obtained;
将所述sql脚本文件中对应的第二查询参数替换为所述第一查询参数,得到对应的数据库查询脚本。The corresponding second query parameter in the sql script file is replaced with the first query parameter, and a corresponding database query script is obtained.
进一步地,为实现上述目的,本申请第三方面还提供一种计算机可读存储介质,所述计算机可读存储介质存储有数据库查询脚本生成程序,所述数据库查询脚本生成程序可被至少一个处理器执行,以使所述至少一个处理器执行如下步骤:Further, in order to achieve the above object, a third aspect of the present application further provides a computer readable storage medium storing a database query script generating program, where the database query script generating program can be processed by at least one Executing to cause the at least one processor to perform the following steps:
若需要对数据库进行相关数据查询,则基于待查询数据生成一个数据库查询指令,并调取预先存储的数据库查询模板,其中,所述查询指令包括待查询数据的类别、待查询数据在所述类别下的功能属性、以及第一查询参数;If the database needs to perform related data query, generate a database query instruction based on the data to be queried, and retrieve a pre-stored database query template, where the query instruction includes a category of the data to be queried, and the data to be queried is in the category. Functional attributes, and first query parameters;
基于所述类别遍历所述数据库查询模板的主目录,获取与所述类别相匹配的主目录、及所述相匹配的主目录下的各个功能子目录;Traversing the main directory of the database query template based on the category, acquiring a home directory matching the category, and each function subdirectory under the matching home directory;
若所述各个功能子目录中有与所述待查询数据在所述类别下的功能属性相匹配的功能子目录,则获取该功能子目录下预先配置的sql脚本文件;If the function sub-directory has a function sub-directory that matches the function attribute of the to-be-queried data in the category, the pre-configured sql script file in the function sub-directory is obtained;
将所述sql脚本文件中对应的第二查询参数替换为所述第一查询参数,得到对应的数据库查询脚本。The corresponding second query parameter in the sql script file is replaced with the first query parameter, and a corresponding database query script is obtained.
相较于现有技术,本申请所提出的电子装置、数据库查询脚本生成方法及存储介质,在需要对数据库进行相关数据查询时,基于待查询数据生成一个数据库查询指令,并调取预先存储的数据库查询模板;基于查询数据的类别遍历数据库查询模板的主目录,得到与查询数据的类别相匹配的主目录、及该主目录下的各个功能子目录;若各个功能子目录中有与待查询数据在该类别下的功能属性相匹配的功能子目录,则获取该功能子目录下预先配置的sql脚本文件;将sql脚本文件中对应的第二查询参数替换为第一查询参数,得到对应的数据库查询脚本,简化了数据库查询过程、提高数据库查询效率。Compared with the prior art, the electronic device, the database query script generating method and the storage medium proposed by the present application generate a database query instruction based on the data to be queried when the related data query needs to be performed on the database, and retrieve the pre-stored a database query template; traversing the home directory of the database query template based on the category of the query data, obtaining a home directory matching the category of the query data, and each function subdirectory under the home directory; if each function subdirectory has and is to be queried If the function sub-directory of the data in the category matches the function sub-directory, the pre-configured sql script file in the function sub-directory is obtained; the corresponding second query parameter in the sql script file is replaced with the first query parameter, and the corresponding The database query script simplifies the database query process and improves the database query efficiency.
附图说明DRAWINGS
图1是本申请提出的电子装置较佳实施例的硬件架构的示意图;1 is a schematic diagram of a hardware architecture of a preferred embodiment of an electronic device proposed by the present application;
图2是本申请电子装置一实施例中数据库查询脚本生成程序对应的程序模块示意图;2 is a schematic diagram of a program module corresponding to a database query script generation program in an embodiment of an electronic device of the present application;
图3是本申请数据库查询脚本生成方法较佳实施例的实施流程示意图。FIG. 3 is a schematic diagram of an implementation process of a preferred embodiment of a method for generating a database query script according to the present application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features and advantages of the present application will be further described with reference to the accompanying drawings.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the objects, technical solutions, and advantages of the present application more comprehensible, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
需要说明的是,在本申请中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。It should be noted that the descriptions of "first", "second" and the like in the present application are for the purpose of description only, and are not to be construed as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. . Thus, features defining "first" and "second" may include at least one of the features, either explicitly or implicitly. In addition, the technical solutions between the various embodiments may be combined with each other, but must be based on the realization of those skilled in the art, and when the combination of the technical solutions is contradictory or impossible to implement, it should be considered that the combination of the technical solutions does not exist. Nor is it within the scope of protection required by this application.
参阅图1所示,是本申请提出的电子装置一可选的硬件架构示意图。本实施例中,电子装置10可以是PC(Personal Computer,个人电脑),也可以是智能手机、平板电脑、电子书阅读器、便携计算机等终端设备。Referring to FIG. 1 , it is an optional hardware architecture diagram of the electronic device proposed by the present application. In this embodiment, the electronic device 10 may be a PC (Personal Computer), or may be a terminal device such as a smart phone, a tablet computer, an e-book reader, or a portable computer.
该电子装置10包括,但不仅限于,存储器101、处理器102、网络接口103、以及通信总线104。需要指出的是,图1仅示出了具有组件101-104的电子装置10,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。The electronic device 10 includes, but is not limited to, a memory 101, a processor 102, a network interface 103, and a communication bus 104. It should be noted that FIG. 1 only shows the electronic device 10 having the components 101-104, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
其中,存储器101至少包括一种类型的计算机可读存储介质,计算机可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器 等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,存储器101可以是电子装置10的内部存储单元,例如电子装置10的硬盘或内存。在另一些实施例中,存储器101也可以是电子装置10的外包存储设备,例如电子装置10上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,存储器101还可以既包括电子装置10的内部存储单元也包括其外包存储设备。本实施例中,存储器101通常用于存储安装于电子装置10的操作系统和各类应用软件,例如数据库查询脚本生成程序的程序代码等。此外,存储器101还可以用于暂时地存储已经输出或者将要输出的各类数据。The memory 101 includes at least one type of computer readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), a random access memory (RAM), and a static Random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like. In some embodiments, the memory 101 can be an internal storage unit of the electronic device 10, such as a hard disk or memory of the electronic device 10. In other embodiments, the memory 101 may also be an outsourced storage device of the electronic device 10, such as a plug-in hard disk equipped on the electronic device 10, a smart memory card (SMC), and a secure digital (Secure Digital, SD) ) cards, flash cards, etc. Of course, the memory 101 can also include both an internal storage unit of the electronic device 10 and an outsourced storage device thereof. In this embodiment, the memory 101 is generally used to store an operating system installed in the electronic device 10 and various types of application software, such as program code of a database query script generating program. Further, the memory 101 can also be used to temporarily store various types of data that have been output or are to be output.
处理器102在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。处理器102通常用于控制电子装置10的总体操作。本实施例中,处理器102用于运行存储器101中存储的程序代码或者处理数据,例如运行的数据库查询脚本生成程序的程序代码等。 Processor 102 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 102 is typically used to control the overall operation of the electronic device 10. In this embodiment, the processor 102 is configured to run program code or processing data stored in the memory 101, such as a program code of a running database query script generating program.
网络接口103可包括无线网络接口或有线网络接口,网络接口103通常用于在电子装置10与其他电子设备之间建立通信连接。The network interface 103 can include a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the electronic device 10 and other electronic devices.
通信总线104用于实现组件101-103之间的通信连接。 Communication bus 104 is used to implement a communication connection between components 101-103.
可选地,电子装置10还可以包括用户接口,用户接口可以包括显示器(Display)、输入单元比如键盘(Keyboard),可选地,用户接口还可以包括标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在基于社交网络的用户关键词提取装置中处理的信息以及用于显示可视化的用户界面。Optionally, the electronic device 10 may further include a user interface, and the user interface may include a display, an input unit such as a keyboard, and optionally, the user interface may further include a standard wired interface and a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch sensor, or the like. The display may also be suitably referred to as a display screen or display unit for displaying information processed in the social network based user keyword extraction device and a user interface for displaying visualization.
在图1所示的电子装置实施例中,存储器101中存储有数据库查询脚本生成程序,处理器102执行存储器101上存储的数据库查询脚本生成程序。In the electronic device embodiment shown in FIG. 1, a memory query script generation program is stored in the memory 101, and the processor 102 executes a database query script generation program stored in the memory 101.
在一实施例中,数据库查询脚本生成程序被处理器102执行时实现如下步骤:In an embodiment, the database query script generation program is executed by the processor 102 to implement the following steps:
A、若需要对数据库进行相关数据查询,则基于待查询数据生成一个数据库查询指令,调取预先存储的数据库查询模板,其中,查询指令包括待查询数据的类别、待查询数据在该类别下的功能属性、以及第一查询参数;A. If a related data query is needed for the database, a database query instruction is generated based on the data to be queried, and a pre-stored database query template is retrieved, wherein the query instruction includes a category of the data to be queried, and the data to be queried is in the category. Functional attributes, and first query parameters;
B、基于查询数据的类别遍历调取的数据库查询模板的主目录,得到与查询数据的类别相匹配的主目录、及相匹配的主目录下的各个功能子目录;B. traversing the home directory of the database query template retrieved based on the category of the query data, obtaining a home directory matching the category of the query data, and each function subdirectory under the matching home directory;
C、若各个功能子目录中有与待查询数据在该类别下的功能属性相匹配的功能子目录,则获取该功能子目录下预先配置的sql脚本文件;C. If each function subdirectory has a function subdirectory that matches the function attribute of the data to be queried in the category, obtain a pre-configured sql script file in the function subdirectory;
D、将所获取的sql脚本l文件中对应的第二查询参数替换为第一查询参数,得到对应的数据库查询脚本。D. Replace the corresponding second query parameter in the obtained sql script l file with the first query parameter, and obtain a corresponding database query script.
可以理解的是,通常软件开发人员会处理多个项目,且同一项目包含有多个开发阶段,为了满足开发人员在不同的项目中、以及在同一项目的各个阶段均可调用预先存储的数据库查询模板并生成数据库查询脚本,在本实施例中,预先存储的数据库查询模板包括至少一个可选择的主目录、且各个主目录下对应有一个或多个可选择的功能子目录、用于输入查询参数的字段输入区域、以及用于显示生成查询脚本的脚本显示区域。且在本实施例中,基于待查询数据生成的数据库查询指令包括待查询数据的类别、待查询数据在该类别下的功能属性、以及第一查询参数。例如,待查询数据为:查询某保单号对应的保额值,则基于该查询数据生成的数据库查询指令包括的待查询数据类别为保单、待查询数据在保单下的功能属性为保额值、以及第一查询参数为保单号。Understandably, software developers usually process multiple projects, and the same project contains multiple development stages. In order to satisfy developers, different pre-stored database queries can be invoked in different projects and at different stages of the same project. The template generates a database query script. In this embodiment, the pre-stored database query template includes at least one selectable home directory, and each home directory corresponds to one or more selectable function subdirectories for inputting a query. The field input area of the parameter and the script display area for displaying the generated query script. In this embodiment, the database query instruction generated based on the data to be queried includes a category of data to be queried, a function attribute of the data to be queried under the category, and a first query parameter. For example, the data to be queried is: querying the insured value corresponding to a policy number, and the data query to be queried according to the database query instruction generated by the query data is a policy, and the function attribute of the data to be queried under the policy is a forbidden value, And the first query parameter is the policy number.
在基于待查询数据生成一个数据库查询指令,并调取预先存储的数据库查询模板后,基于待查询数据的类别遍历数据库查询模板的主目录,例如, 基于保单遍历数据库查询模板的主目录,进一步地,在主目录菜单中得到与保单相匹配的主目录,及保单下对应的各个功能子目录,例如,保单销售、保单扩展、批单、保单支付、保单保额、保单共保信息等。可以理解的是,预先存储的数据库查询模板中主目录以及每个主目录下对应的各个功能子目录的名称可以由开发人员根据项目的需要进行自定义,在本实施例中,每个主目录的名称与待查询数据的类别一一对应,例如,待查询的数据的类别为银行卡,则对应的主目录为银行卡,且每个主目录下各个功能子目录的名称分别与其存放的sql脚本文件中脚本的功能属性一一对应。After generating a database query instruction based on the data to be queried, and retrieving the pre-stored database query template, traversing the home directory of the database query template based on the category of the data to be queried, for example, traversing the home directory of the database query template based on the policy, further In the main menu, you can get the main catalog that matches the policy, and the corresponding function sub-directories under the policy, for example, policy sales, policy extension, batch, policy payment, policy insurance, policy and insurance information. It can be understood that the names of the main directory in the pre-stored database query template and the corresponding function sub-directories in each main directory can be customized by the developer according to the needs of the project. In this embodiment, each home directory The name of the data to be queried corresponds to the category of the data to be queried. For example, if the category of the data to be queried is a bank card, the corresponding home directory is a bank card, and the names of the respective functional subdirectories under each home directory are respectively associated with the sql stored therein. The function attributes of the scripts in the script file correspond one-to-one.
若各个功能子目录中有与待查询数据在该类别下的功能属性相匹配的功能子目录,例如,功能子目录保单保额与保额相匹配,则进一步获取该功能子目录下预先配置的sql脚本文件,可以理解地,sql脚本文件中的“脚本”代表的是脚本名称,该脚本名称由开发人员根据项目需要进行编写,一般脚本名称不要太长,例如,保单扩展的sql脚本、保单销售的sql脚本等,且为了查询及获取的方便,在脚本名称前加序号,例如,01,02之类的,脚本内容由开发人员预先自己编写,且脚本内容中包含有可动态修改的第二查询参数,例如,保单号、保额值等。If each function subdirectory has a function sub-directory that matches the function attribute of the data to be queried in the category, for example, the function sub-directory policy insurance amount matches the insurance amount, further obtaining the pre-configured sub-directory of the function sub-directory Sql script file, understandably, the "script" in the sql script file represents the script name, the script name is written by the developer according to the project needs, the general script name is not too long, for example, the policy extension sql script, policy Sales of sql scripts, etc., and for the convenience of query and access, add a sequence number in front of the script name, for example, 01, 02, etc., the script content is written by the developer in advance, and the script content contains dynamically modified Second, query parameters, such as policy number, insured value, and so on.
最后,将相匹配的功能子目录下预先配置的sql脚本中对应的第二查询参数替换为第一查询参数,得到对应的数据库查询脚本。Finally, the corresponding second query parameter in the pre-configured sql script in the matched function subdirectory is replaced with the first query parameter, and the corresponding database query script is obtained.
可以理解地是,若各个功能子目录均与查询指令中待查询数据的功能属性不匹配,则发出对应的提示信息,以提醒对应的查询人员进行数据查询脚本的编写。It can be understood that if each function sub-directory does not match the function attribute of the data to be queried in the query instruction, the corresponding prompt information is sent to remind the corresponding query personnel to write the data query script.
进一步需要说明的是,预先存储的数据库查询模板中数据库查询脚本的生成过程包括如下步骤:It should be further noted that the process of generating a database query script in a pre-stored database query template includes the following steps:
读取SQLHelper主页,并基于SQLHelper主页建立一个本地存放脚本的主目录,其中,主目录的名称与待查询数据的类别相匹配;Read the SQLHelper home page, and create a home directory of the local storage script based on the SQLHelper home page, where the name of the home directory matches the category of the data to be queried;
分别在主目录下生成各个功能子目录,各个功能子目录用于存放sql脚 本文件,且各个功能子目录的名称分别与其存放的sql脚本文件中脚本的功能属性相匹配;Each function subdirectory is generated in the main directory, and each function subdirectory is used to store the sql script file, and the names of the respective function subdirectories are respectively matched with the function attributes of the script in the sql script file stored therein;
将软件开发过程中编写的查询脚本分别根据脚本的功能属性以sql脚本文件的形式同步存储在对应的功能子目录中,得到数据库查询模板中的查询脚本。The query scripts written in the software development process are synchronously stored in the corresponding function subdirectories in the form of sql script files according to the function attributes of the scripts, and the query scripts in the database query template are obtained.
上述实施例提出的电子装置,在需要对数据库进行相关数据查询时,基于待查询数据生成一个数据库查询指令,并调取预先存储的数据库查询模板;基于查询数据的类别遍历数据库查询模板的主目录,得到与查询数据的类别相匹配的主目录、及该主目录下的各个功能子目录;若各个功能子目录中有与待查询数据在该类别下的功能属性相匹配的功能子目录,则获取该功能子目录下预先配置的sql脚本文件;将sql脚本文件中对应的第二查询参数替换为第一查询参数,得到对应的数据库查询脚本,简化了数据库查询过程、提高数据库查询效率。进一步需要说明的是,数据库查询脚本生成程序依据其各部分程序段所实现的功能不同,可将数据库查询脚本生成程序段用具有相同功能的虚拟的程序模块进行描述。The electronic device proposed by the foregoing embodiment generates a database query instruction based on the data to be queried when the related data query needs to be performed, and retrieves a pre-stored database query template; traverses the home directory of the database query template based on the category of the query data. , obtaining a home directory matching the category of the query data, and each function subdirectory under the home directory; if each function subdirectory has a function subdirectory matching the function attribute of the data to be queried under the category, Obtain the pre-configured sql script file in the function subdirectory; replace the corresponding second query parameter in the sql script file with the first query parameter, and obtain the corresponding database query script, which simplifies the database query process and improves the database query efficiency. It should be further noted that the database query script generation program may describe the database query script generation program segment by using a virtual program module having the same function according to different functions implemented by each part of the program segment.
请参阅图2所示,是本申请电子装置一实施例中数据库查询脚本生成程序对应的程序模块示意图。本实施例中,数据库查询脚本生成程序可以被分割成调取模块201、第一匹配模块202、第二匹配模块203、以及替换模块204。上述的各个程序模块201-204所实现的功能或操作步骤均与上文类似,此处不再详述,示例性地,例如其中:Please refer to FIG. 2 , which is a schematic diagram of a program module corresponding to a database query script generation program in an embodiment of the electronic device of the present application. In this embodiment, the database query script generating program may be divided into a calling module 201, a first matching module 202, a second matching module 203, and a replacement module 204. The functions or operational steps implemented by the respective program modules 201-204 described above are similar to the above, and are not described in detail herein, by way of example, for example:
调取模块201用于若需要对数据库进行相关数据查询,则基于待查询数据生成一个数据库查询指令,并调取预先存储的数据库查询模板,其中,查询指令包括待查询数据的类别、待查询数据在对应类别下的功能属性、以及第一查询参数;The retrieving module 201 is configured to generate a database query instruction based on the data to be queried, and retrieve a pre-stored database query template, where the query instruction includes the category of the data to be queried and the data to be queried. a function attribute under the corresponding category, and a first query parameter;
第一匹配模块202用于基于待查询数据的类别遍历数据库查询模板的主目录,获取与待查询数据的类别相匹配的主目录、及相匹配的主目录下的各 个功能子目录;The first matching module 202 is configured to traverse the main directory of the database query template based on the category of the data to be queried, obtain a main directory that matches the category of the data to be queried, and each functional subdirectory under the matching main directory;
第二匹配模块203用于若各个功能子目录中有与待查询数据在对应的类别下的功能属性相匹配的功能子目录,则获取该功能子目录下预先配置的sql脚本;The second matching module 203 is configured to obtain a pre-configured sql script in the function sub-directory if there is a function sub-directory in each function sub-directory that matches the function attribute of the data to be queried in the corresponding category;
替换模块204用于将sql脚本文件中对应的第二查询参数替换为第一查询参数,得到对应的数据库查询脚本。The replacement module 204 is configured to replace the corresponding second query parameter in the sql script file with the first query parameter to obtain a corresponding database query script.
此外,本申请还提供一种数据库查询脚本生成方法。请参阅图3所示,是本申请数据库查询脚本生成方法较佳实施例的实施流程示意图。该方法可以由一个装置执行,该装置可以由软件和/或硬件实现。In addition, the present application also provides a database query script generation method. Please refer to FIG. 3 , which is a schematic flowchart of an implementation process of a preferred embodiment of a database query script generation method. The method can be performed by a device that can be implemented by software and/or hardware.
在本实施例中,数据库查询脚本生成方法包括:In this embodiment, the database query script generation method includes:
步骤S301,若需要对数据库进行相关数据查询,则基于待查询数据生成一个数据库查询指令,调取预先存储的数据库查询模板,其中,查询指令包括待查询数据的类别、待查询数据在该类别下的功能属性、以及第一查询参数;Step S301: If a related data query is required to be performed on the database, generate a database query instruction based on the data to be queried, and retrieve a pre-stored database query template, where the query instruction includes a category of the data to be queried, and the data to be queried is in the category. Functional attributes, and first query parameters;
步骤S302,基于查询数据的类别遍历调取的数据库查询模板的主目录,得到与查询数据的类别相匹配的主目录、及相匹配的主目录下的各个功能子目录;Step S302, traversing the home directory of the retrieved database query template based on the category of the query data, obtaining a home directory matching the category of the query data, and each function subdirectory under the matching home directory;
步骤S303,若各个功能子目录中有与待查询数据在该类别下的功能属性相匹配的功能子目录,则获取该功能子目录下预先配置的sql脚本文件;Step S303, if there is a function sub-directory in the function sub-directory that matches the function attribute of the data to be queried in the category, the pre-configured sql script file in the function sub-directory is obtained;
步骤S304,将所获取的sql脚本文件中对应的第二查询参数替换为第一查询参数,得到对应的数据库查询脚本。Step S304, replacing the corresponding second query parameter in the obtained sql script file with the first query parameter, to obtain a corresponding database query script.
可以理解的是,通常软件开发人员会处理多个项目,且同一项目包含有多个开发阶段,为了满足开发人员在不同的项目中、以及在同一项目的各个阶段均可调用预先存储的数据库查询模板并生成数据库查询脚本,在本实施例中,预先存储的数据库查询模板包括至少一个可选择的主目录、且各个主目录下对应有一个或多个可选择的功能子目录、用于输入查询参数的字段输 入区域、以及用于显示生成查询脚本的脚本显示区域。且在本实施例中,基于待查询数据生成的数据库查询指令包括待查询数据的类别、待查询数据在该类别下的功能属性、以及第一查询参数。例如,待查询数据为:查询某保单号对应的保额值,则基于该查询数据生成的数据库查询指令包括的待查询数据类别为保单、待查询数据在保单下的功能属性为保额值、以及第一查询参数为保单号。Understandably, software developers usually process multiple projects, and the same project contains multiple development stages. In order to satisfy developers, different pre-stored database queries can be invoked in different projects and at different stages of the same project. The template generates a database query script. In this embodiment, the pre-stored database query template includes at least one selectable home directory, and each home directory corresponds to one or more selectable function subdirectories for inputting a query. The field input area of the parameter and the script display area for displaying the generated query script. In this embodiment, the database query instruction generated based on the data to be queried includes a category of data to be queried, a function attribute of the data to be queried under the category, and a first query parameter. For example, the data to be queried is: querying the insured value corresponding to a policy number, and the data query to be queried according to the database query instruction generated by the query data is a policy, and the function attribute of the data to be queried under the policy is a forbidden value, And the first query parameter is the policy number.
在基于待查询数据生成一个数据库查询指令,并调取预先存储的数据库查询模板后,基于待查询数据的类别遍历数据库查询模板的主目录,例如,基于保单遍历数据库查询模板的主目录,进一步地,在主目录菜单中得到与保单相匹配的主目录,及保单下对应的各个功能子目录,例如,保单销售、保单扩展、批单、保单支付、保单保额、保单共保信息等。可以理解的是,预先存储的数据库查询模板中主目录以及每个主目录下对应的各个功能子目录的名称可以由开发人员根据项目的需要进行自定义,在本实施例中,每个主目录的名称与待查询数据的类别一一对应,例如,待查询的数据的类别为银行卡,则对应的主目录为银行卡,且每个主目录下各个功能子目录的名称分别与其存放的sql脚本文件中脚本的功能属性一一对应。After generating a database query instruction based on the data to be queried and retrieving the pre-stored database query template, traversing the home directory of the database query template based on the category of the data to be queried, for example, traversing the home directory of the database query template based on the policy, further In the main menu, you can get the main catalog that matches the policy, and the corresponding function sub-directories under the policy, for example, policy sales, policy extension, batch, policy payment, policy insurance, policy and insurance information. It can be understood that the names of the main directory in the pre-stored database query template and the corresponding function sub-directories in each main directory can be customized by the developer according to the needs of the project. In this embodiment, each home directory The name of the data to be queried corresponds to the category of the data to be queried. For example, if the category of the data to be queried is a bank card, the corresponding home directory is a bank card, and the names of the respective functional subdirectories under each home directory are respectively associated with the sql stored therein. The function attributes of the scripts in the script file correspond one-to-one.
若各个功能子目录中有与待查询数据在该类别下的功能属性相匹配的功能子目录,例如,功能子目录保单保额与保额相匹配,则进一步获取该功能子目录下预先配置的sql脚本文件,可以理解地,sql脚本文件中的“脚本”代表的是脚本名称,该脚本名称由开发人员根据项目需要进行编写,一般脚本名称不要太长,例如,保单扩展的sql脚本、保单销售的sql脚本.等,且为了查询及获取的方便,在脚本名称前加序号,例如,01,02之类的,脚本内容由开发人员预先自己编写,且脚本内容中包含有可动态修改的第二查询参数,例如,保单号、保额值等。If each function subdirectory has a function sub-directory that matches the function attribute of the data to be queried in the category, for example, the function sub-directory policy insurance amount matches the insurance amount, further obtaining the pre-configured sub-directory of the function sub-directory Sql script file, understandably, the "script" in the sql script file represents the script name, the script name is written by the developer according to the project needs, the general script name is not too long, for example, the policy extension sql script, policy Sales of sql scripts, etc., and for the convenience of query and access, add a sequence number in front of the script name, for example, 01, 02, etc., the script content is written by the developer in advance, and the script content contains dynamically modified The second query parameter, for example, the policy number, the insured value, and the like.
最后,将相匹配的功能子目录下预先配置的sql脚本中对应的第二查询参数替换为第一查询参数,得到对应的数据库查询脚本。Finally, the corresponding second query parameter in the pre-configured sql script in the matched function subdirectory is replaced with the first query parameter, and the corresponding database query script is obtained.
可以理解地是,若各个功能子目录均与查询指令中待查询数据的功能属性不匹配,则发出对应的提示信息,以提醒对应的查询人员进行数据查询脚本的编写。It can be understood that if each function sub-directory does not match the function attribute of the data to be queried in the query instruction, the corresponding prompt information is sent to remind the corresponding query personnel to write the data query script.
进一步需要说明的是,预先存储的数据库查询模板中数据库查询脚本的生成过程包括如下步骤:It should be further noted that the process of generating a database query script in a pre-stored database query template includes the following steps:
读取SQLHelper主页,并基于SQLHelper主页建立一个本地存放脚本的主目录,其中,主目录的名称与待查询数据的类别相匹配;Read the SQLHelper home page, and create a home directory of the local storage script based on the SQLHelper home page, where the name of the home directory matches the category of the data to be queried;
分别在主目录下生成各个功能子目录,各个功能子目录用于存放sql脚本文件,且各个功能子目录的名称分别与其存放的sql脚本文件中脚本的功能属性相匹配;Each function subdirectory is generated in the main directory, and each function subdirectory is used to store the sql script file, and the names of the respective function subdirectories are respectively matched with the function attributes of the scripts in the sql script file stored therein;
将软件开发过程中编写的查询脚本分别根据脚本的功能属性以sql脚本文件的形式同步存储在对应的功能子目录中,得到数据库查询模板中的查询脚本。The query scripts written in the software development process are synchronously stored in the corresponding function subdirectories in the form of sql script files according to the function attributes of the scripts, and the query scripts in the database query template are obtained.
上述实施例提出的数据库查询脚本生成方法,在需要对数据库进行相关数据查询时,基于待查询数据生成一个数据库查询指令,并调取预先存储的数据库查询模板;基于查询数据的类别遍历数据库查询模板的主目录,得到与查询数据的类别相匹配的主目录、及该主目录下的各个功能子目录;若各个功能子目录中有与待查询数据在该类别下的功能属性相匹配的功能子目录,则获取该功能子目录下预先配置的sql脚本文件;将sql脚本文件中对应的第二查询参数替换为第一查询参数,得到对应的数据库查询脚本,简化了数据库查询过程、提高数据库查询效率。The database query script generation method proposed by the foregoing embodiment generates a database query instruction based on the data to be queried when the related data query needs to be performed, and retrieves a pre-stored database query template; traverses the database query template based on the category of the query data. The home directory, the home directory matching the category of the query data, and the function subdirectories under the home directory; if each function subdirectory has a function that matches the function attribute of the data to be queried under the category The directory obtains the pre-configured sql script file in the function subdirectory; replaces the corresponding second query parameter in the sql script file with the first query parameter, and obtains the corresponding database query script, which simplifies the database query process and improves the database query. effectiveness.
此外,本申请实施例还提出一种计算机可读存储介质,该计算机可读存储介质上存储有数据库查询脚本生成程序,该数据库查询脚本生成程序被处理器执行时实现如下操作:In addition, the embodiment of the present application further provides a computer readable storage medium, where the database readable storage medium is stored with a database query script generating program, and the database query script generating program is executed by the processor to:
若需要对数据库进行相关数据查询,则基于待查询数据生成一个数据库查询指令,并调取预先存储的数据库查询模板,其中,查询指令包括待查询 数据的类别、待查询数据在待查询数据的类别下的功能属性、以及第一查询参数;If the database needs to perform related data query, generate a database query instruction based on the data to be queried, and retrieve a pre-stored database query template, wherein the query instruction includes a category of the data to be queried, and the data to be queried is in the category of the data to be queried. Functional attributes, and first query parameters;
基于所述类别遍历数据库查询模板的主目录,获取与待查询数据的类别相匹配的主目录、及相匹配的主目录下的各个功能子目录;And traversing the home directory of the database query template based on the category, acquiring a home directory matching the category of the data to be queried, and each function sub-directory under the matching home directory;
若各个功能子目录中有与待查询数据在待查询数据的类别下的功能属性相匹配的功能子目录,则获取该功能子目录下预先配置的sql脚本文件;If each function subdirectory has a function subdirectory that matches the function attribute of the data to be queried in the category of the data to be queried, the pre-configured sql script file in the function subdirectory is obtained;
将sql脚本文件中对应的第二查询参数替换为第一查询参数,得到对应的数据库查询脚本。The corresponding second query parameter in the sql script file is replaced with the first query parameter to obtain a corresponding database query script.
进一步地,数据库查询脚本生成程序被处理器执行时还实现如下步骤:Further, when the database query script generation program is executed by the processor, the following steps are also implemented:
若各个功能子目录均与查询指令中待查询数据的功能属性不匹配,则发出对应的提示信息,以提醒对应的查询人员进行数据查询脚本的编写。If the function sub-directories do not match the function attributes of the data to be queried in the query instruction, the corresponding prompt information is sent to remind the corresponding query personnel to write the data query script.
进一步地,预先存储的数据库查询模板包括:主目录,每个主目录下对应的各个功能子目录、用于输入查询参数的字段输入区域、以及用于显示生成查询脚本的脚本显示区域。Further, the pre-stored database query template includes: a main directory, corresponding function sub-directories under each main directory, a field input area for inputting query parameters, and a script display area for displaying a generated query script.
进一步地,预先存储的数据库查询模板中数据库查询脚本的生成过程包括如下步骤:Further, the process of generating the database query script in the pre-stored database query template includes the following steps:
读取SQLHelper主页,并基于SQLHelper主页建立一个本地存放脚本的主目录,其中,主目录的名称与待查询数据的类别相匹配;Read the SQLHelper home page, and create a home directory of the local storage script based on the SQLHelper home page, where the name of the home directory matches the category of the data to be queried;
分别在主目录下生成各个功能子目录,各个功能子目录用于存放sql脚本文件,且各个功能子目录的名称分别与其存放的sql脚本文件中脚本的功能属性相匹配;Each function subdirectory is generated in the main directory, and each function subdirectory is used to store the sql script file, and the names of the respective function subdirectories are respectively matched with the function attributes of the scripts in the sql script file stored therein;
将软件开发过程中编写的查询脚本分别根据脚本的功能属性以sql脚本文件的形式同步存储在对应的功能子目录中,得到数据库查询模板中的数据库查询脚本。The query scripts written in the software development process are synchronously stored in the corresponding function subdirectories in the form of sql script files according to the function attributes of the scripts, and the database query scripts in the database query template are obtained.
本申请提出的计算机可读存储介质具体实施方式与上述电子装置和数据库查询脚本生成方法各实施例基本相同,在此不作累述。The specific embodiment of the computer readable storage medium proposed by the present application is substantially the same as the foregoing embodiments of the electronic device and the database query script generating method, and is not described herein.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present application are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better. Implementation. Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above is only a preferred embodiment of the present application, and is not intended to limit the scope of the patent application, and the equivalent structure or equivalent process transformations made by the specification and the drawings of the present application, or directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of this application.

Claims (20)

  1. 一种电子装置,其特征在于,所述电子装置包括存储器、及与所述存储器连接的处理器,所述存储器上存储有数据库查询脚本生成程序,所述处理器用于执行所述存储器上存储的数据库查询脚本生成程序,所述数据库查询脚本生成程序被所述处理器执行时实现如下步骤:An electronic device, comprising: a memory, and a processor connected to the memory, wherein the memory stores a database query script generating program, and the processor is configured to execute the stored on the memory The database query script generation program, when the database query script generation program is executed by the processor, implements the following steps:
    若需要对数据库进行相关数据查询,则基于待查询数据生成一个数据库查询指令,并调取预先存储的数据库查询模板,其中,所述查询指令包括待查询数据的类别、待查询数据在所述类别下的功能属性、以及第一查询参数;If the database needs to perform related data query, generate a database query instruction based on the data to be queried, and retrieve a pre-stored database query template, where the query instruction includes a category of the data to be queried, and the data to be queried is in the category. Functional attributes, and first query parameters;
    基于所述类别遍历所述数据库查询模板的主目录,获取与所述类别相匹配的主目录、及所述相匹配的主目录下的各个功能子目录;Traversing the main directory of the database query template based on the category, acquiring a home directory matching the category, and each function subdirectory under the matching home directory;
    若所述各个功能子目录中有与所述待查询数据在所述类别下的功能属性相匹配的功能子目录,则获取该功能子目录下预先配置的sql脚本文件;If the function sub-directory has a function sub-directory that matches the function attribute of the to-be-queried data in the category, the pre-configured sql script file in the function sub-directory is obtained;
    将所述sql脚本文件中对应的第二查询参数替换为所述第一查询参数,得到对应的数据库查询脚本。The corresponding second query parameter in the sql script file is replaced with the first query parameter, and a corresponding database query script is obtained.
  2. 如权利要求1所述的电子装置,其特征在于,所述数据库查询脚本生成程序被所述处理器执行时还实现如下步骤:The electronic device according to claim 1, wherein the database query script generating program is further executed by the processor to:
    若所述各个功能子目录均与所述查询指令中待查询数据的功能属性不匹配,则发出对应的提示信息,以提醒对应的查询人员进行数据查询脚本的编写。If the function sub-directories do not match the function attributes of the data to be queried in the query instruction, the corresponding prompt information is sent to remind the corresponding query personnel to write the data query script.
  3. 如权利要求1所述的电子装置,其特征在于,所述预先存储的数据库查询模板包括至少一个可选择的主目录、用于输入查询参数的字段输入区域及用于显示生成的查询脚本的脚本显示区域,其中,各个所述主目录下对应有一个或多个可选择的功能子目录。The electronic device of claim 1, wherein the pre-stored database query template comprises at least one selectable home directory, a field input area for inputting query parameters, and a script for displaying the generated query script A display area, wherein each of the home directories corresponds to one or more selectable function subdirectories.
  4. 如权利要求3所述的电子装置,其特征在于,所述预先存储的数据库查询模板中所述数据库查询脚本的生成过程包括如下步骤:The electronic device according to claim 3, wherein the generating process of the database query script in the pre-stored database query template comprises the following steps:
    读取SQLHelper主页,并基于所述SQLHelper主页建立一个本地存放脚 本的主目录,其中,所述主目录的名称与所述待查询数据的类别相匹配;Reading the SQLHelper homepage, and establishing a home directory of the local storage script based on the SQLHelper homepage, wherein the name of the home directory matches the category of the data to be queried;
    分别在所述主目录下生成各个功能子目录,所述各个功能子目录用于存放sql脚本文件,且所述各个功能子目录的名称分别与其存放的sql脚本文件中脚本的功能属性相匹配;Each function subdirectory is generated in the main directory, and the function subdirectories are used to store the sql script file, and the names of the function subdirectories are respectively matched with the function attributes of the scripts in the sql script file stored therein;
    将软件开发过程中编写的查询脚本分别根据脚本的功能属性以sql脚本文件的形式同步存储在对应的功能子目录中,得到所述数据库查询模板中的数据库查询脚本。The query scripts written in the software development process are synchronously stored in the corresponding function subdirectories in the form of sql script files according to the function attributes of the scripts, and the database query scripts in the database query template are obtained.
  5. 如权利要求1所述的电子装置,其特征在于,所述sql脚本文件中包含动态修改的第二查询参数。The electronic device according to claim 1, wherein the sql script file includes a dynamically modified second query parameter.
  6. 如权利要求2所述的电子装置,其特征在于,所述sql脚本文件中包含动态修改的第二查询参数。The electronic device according to claim 2, wherein the sql script file includes a dynamically modified second query parameter.
  7. 如权利要求3所述的电子装置,其特征在于,所述sql脚本文件中包含动态修改的第二查询参数。The electronic device according to claim 3, wherein the sql script file includes a dynamically modified second query parameter.
  8. 如权利要求4所述的电子装置,其特征在于,所述sql脚本文件中包含动态修改的第二查询参数。The electronic device according to claim 4, wherein the sql script file includes a dynamically modified second query parameter.
  9. 一种数据库查询脚本生成方法,其特征在于,所述方法包括如下步骤:A database query script generating method, characterized in that the method comprises the following steps:
    若需要对数据库进行相关数据查询,则基于待查询数据生成一个数据库查询指令,并调取预先存储的数据库查询模板,其中,所述查询指令包括待查询数据的类别、待查询数据在所述类别下的功能属性、以及第一查询参数;If the database needs to perform related data query, generate a database query instruction based on the data to be queried, and retrieve a pre-stored database query template, where the query instruction includes a category of the data to be queried, and the data to be queried is in the category. Functional attributes, and first query parameters;
    基于所述类别遍历所述数据库查询模板的主目录,获取与所述类别相匹配的主目录、及所述相匹配的主目录下的各个功能子目录;Traversing the main directory of the database query template based on the category, acquiring a home directory matching the category, and each function subdirectory under the matching home directory;
    若所述各个功能子目录中有与所述待查询数据在所述类别下的功能属性相匹配的功能子目录,则获取该功能子目录下预先配置的sql脚本文件;If the function sub-directory has a function sub-directory that matches the function attribute of the to-be-queried data in the category, the pre-configured sql script file in the function sub-directory is obtained;
    将所述sql脚本文件中对应的第二查询参数替换为所述第一查询参数,得到对应的数据库查询脚本。The corresponding second query parameter in the sql script file is replaced with the first query parameter, and a corresponding database query script is obtained.
  10. 如权利要求9所述的数据库查询脚本生成方法,其特征在于,所述方 法还包括如下步骤:The method of generating a database query script according to claim 9, wherein the method further comprises the following steps:
    若所述各个功能子目录均与所述查询指令中待查询数据的功能属性不匹配,则发出对应的提示信息,以提醒对应的查询人员进行数据查询脚本的编写。If the function sub-directories do not match the function attributes of the data to be queried in the query instruction, the corresponding prompt information is sent to remind the corresponding query personnel to write the data query script.
  11. 如权利要求10所述的数据库查询脚本生成方法,其特征在于,所述预先存储的数据库查询模板包括至少一个可选择的主目录、用于输入查询参数的字段输入区域以及用于显示生成查询脚本的脚本显示区域,其中,各个所述主目录下对应有一个或多个可选择的功能子目录。The database query script generating method according to claim 10, wherein said pre-stored database query template comprises at least one selectable home directory, a field input area for inputting query parameters, and a display query script for displaying The script display area, wherein each of the main directories corresponds to one or more selectable function subdirectories.
  12. 如权利要求11所述的数据库查询脚本生成方法,其特征在于,所述预先存储的数据库查询模板中所述数据库查询脚本的生成过程包括如下步骤:The database query script generating method according to claim 11, wherein the generating process of the database query script in the pre-stored database query template comprises the following steps:
    读取SQLHelper主页,并基于所述SQLHelper主页建立一个本地存放脚本的主目录,其中,所述主目录的名称与所述待查询数据的类别相匹配;Reading the SQLHelper homepage, and establishing a home directory of the local storage script based on the SQLHelper homepage, wherein the name of the home directory matches the category of the data to be queried;
    分别在所述主目录下生成各个功能子目录,所述各个功能子目录用于存放sql脚本文件,且所述各个功能子目录的名称分别与其存放的sql脚本文件中脚本的功能属性相匹配;Each function subdirectory is generated in the main directory, and the function subdirectories are used to store the sql script file, and the names of the function subdirectories are respectively matched with the function attributes of the scripts in the sql script file stored therein;
    将软件开发过程中编写的查询脚本分别根据脚本的功能属性以sql脚本文件的形式同步存储在对应的功能子目录中,得到所述数据库查询模板中的数据库查询脚本。The query scripts written in the software development process are synchronously stored in the corresponding function subdirectories in the form of sql script files according to the function attributes of the scripts, and the database query scripts in the database query template are obtained.
  13. 如权利要求9所述的数据库查询脚本生成方法,其特征在于,所述sql脚本文件中包含动态修改的第二查询参数。The database query script generating method according to claim 9, wherein the sql script file includes a dynamically modified second query parameter.
  14. 如权利要求10所述的数据库查询脚本生成方法,其特征在于,所述sql脚本文件中包含动态修改的第二查询参数。The database query script generating method according to claim 10, wherein the sql script file includes a dynamically modified second query parameter.
  15. 如权利要求11所述的数据库查询脚本生成方法,其特征在于,所述sql脚本文件中包含动态修改的第二查询参数。The database query script generating method according to claim 11, wherein the sql script file includes a dynamically modified second query parameter.
  16. 如权利要求12所述的数据库查询脚本生成方法,其特征在于,所述sql 脚本文件中包含动态修改的第二查询参数。The database query script generating method according to claim 12, wherein the sql script file includes a dynamically modified second query parameter.
  17. 一种计算机可读存储介质,所述计算机可读存储介质存储有数据库查询脚本生成程序,所述数据库查询脚本生成程序可被至少一个处理器执行,以使所述至少一个处理器执行如下步骤:A computer readable storage medium storing a database query script generation program executable by at least one processor to cause the at least one processor to perform the following steps:
    若需要对数据库进行相关数据查询,则基于待查询数据生成一个数据库查询指令,并调取预先存储的数据库查询模板,其中,所述查询指令包括待查询数据的类别、待查询数据在所述类别下的功能属性、以及第一查询参数;If the database needs to perform related data query, generate a database query instruction based on the data to be queried, and retrieve a pre-stored database query template, where the query instruction includes a category of the data to be queried, and the data to be queried is in the category. Functional attributes, and first query parameters;
    基于所述类别遍历所述数据库查询模板的主目录,获取与所述类别相匹配的主目录、及所述相匹配的主目录下的各个功能子目录;Traversing the main directory of the database query template based on the category, acquiring a home directory matching the category, and each function subdirectory under the matching home directory;
    若所述各个功能子目录中有与所述待查询数据在所述类别下的功能属性相匹配的功能子目录,则获取该功能子目录下预先配置的sql脚本文件;If the function sub-directory has a function sub-directory that matches the function attribute of the to-be-queried data in the category, the pre-configured sql script file in the function sub-directory is obtained;
    将所述sql脚本文件中对应的第二查询参数替换为所述第一查询参数,得到对应的数据库查询脚本。The corresponding second query parameter in the sql script file is replaced with the first query parameter, and a corresponding database query script is obtained.
  18. 如权利要求17所述的存储介质,其特征在于,数据库查询脚本生成程序可被至少一个处理器执行,以使所述至少一个处理器还执行如下步骤:The storage medium of claim 17, wherein the database query script generation program is executable by the at least one processor such that the at least one processor further performs the following steps:
    若所述各个功能子目录均与所述查询指令中待查询数据的功能属性不匹配,则发出对应的提示信息,以提醒对应的查询人员进行数据查询脚本的编写。If the function sub-directories do not match the function attributes of the data to be queried in the query instruction, the corresponding prompt information is sent to remind the corresponding query personnel to write the data query script.
  19. 如权利要求18所述的存储介质,其特征在于,所述预先存储的数据库查询模板包括至少一个可选择的主目录、用于输入查询参数的字段输入区域以及用于显示生成查询脚本的脚本显示区域,其中,各个所述主目录下对应有一个或多个可选择的功能子目录。The storage medium according to claim 18, wherein said pre-stored database query template comprises at least one selectable home directory, a field input area for inputting query parameters, and a script display for displaying a generated query script An area, wherein each of the main directories corresponds to one or more selectable functional subdirectories.
  20. 如权利要求19所述的存储介质,其特征在于,所述预先存储的数据库查询模板中所述数据库查询脚本的生成过程包括如下步骤:The storage medium according to claim 19, wherein the generating process of the database query script in the pre-stored database query template comprises the following steps:
    读取SQLHelper主页,并基于所述SQLHelper主页建立一个本地存放脚本的主目录,其中,所述主目录的名称与所述待查询数据的类别相匹配;Reading the SQLHelper homepage, and establishing a home directory of the local storage script based on the SQLHelper homepage, wherein the name of the home directory matches the category of the data to be queried;
    分别在所述主目录下生成各个功能子目录,所述各个功能子目录用于存放sql脚本文件,且所述各个功能子目录的名称分别与其存放的sql脚本文件中脚本的功能属性相匹配;Each function subdirectory is generated in the main directory, and the function subdirectories are used to store the sql script file, and the names of the function subdirectories are respectively matched with the function attributes of the scripts in the sql script file stored therein;
    将软件开发过程中编写的查询脚本分别根据脚本的功能属性以sql脚本文件的形式同步存储在对应的功能子目录中,得到所述数据库查询模板中的数据库查询脚本。The query scripts written in the software development process are synchronously stored in the corresponding function subdirectories in the form of sql script files according to the function attributes of the scripts, and the database query scripts in the database query template are obtained.
PCT/CN2018/076183 2017-10-09 2018-02-10 Electronic device, database query script generation method and storage medium WO2019071898A1 (en)

Applications Claiming Priority (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
CN201710929614.1 2017-10-09

Publications (1)

Publication Number Publication Date
WO2019071898A1 true WO2019071898A1 (en) 2019-04-18

Family

ID=61662280

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/076183 WO2019071898A1 (en) 2017-10-09 2018-02-10 Electronic device, database query script generation method and storage medium

Country Status (2)

Country Link
CN (1) CN107844519A (en)
WO (1) WO2019071898A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
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

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110413630A (en) * 2018-08-27 2019-11-05 上海纵坤信息技术有限公司 Examination criteria searching system and method
CN109445768B (en) * 2018-09-28 2022-02-11 平安科技(深圳)有限公司 Database script generation method and device, computer equipment and storage medium
CN112287021B (en) * 2020-07-13 2024-04-05 上海柯林布瑞信息技术有限公司 Method and device for generating and synchronizing real-time data synchronization parameters, storage medium and terminal

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101788996A (en) * 2009-11-19 2010-07-28 山东浪潮齐鲁软件产业股份有限公司 User-defined searching method
CN104809254A (en) * 2015-05-19 2015-07-29 郑州悉知信息技术有限公司 Data query method and device
CN105224544A (en) * 2014-05-30 2016-01-06 北大方正集团有限公司 A kind of data editing method of database and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7590613B2 (en) * 2003-08-13 2009-09-15 Oracle International Corporation Layout aware calculations
CN102193922B (en) * 2010-03-04 2013-07-24 杭州华三通信技术有限公司 Method and device for accessing database
CN105630472B (en) * 2014-11-03 2019-12-24 中国科学院沈阳自动化研究所 Client rapid development framework of manufacturing execution system and software development method thereof
CN106202322A (en) * 2016-06-30 2016-12-07 乐视控股(北京)有限公司 A kind of page generation method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
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
CN104809254A (en) * 2015-05-19 2015-07-29 郑州悉知信息技术有限公司 Data query method and device

Cited By (1)

* Cited by examiner, † Cited by third party
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

Also Published As

Publication number Publication date
CN107844519A (en) 2018-03-27

Similar Documents

Publication Publication Date Title
WO2019140828A1 (en) Electronic apparatus, method for querying logs in distributed system, and storage medium
US7200617B2 (en) Program for managing external storage, recording medium, management device, and computing system
WO2019148722A1 (en) Electronic device, data migrating and calling method and storage medium
WO2020015166A1 (en) Charting component creation method and device and computer readable storage medium
WO2019148720A1 (en) Electronic device, data storage method and storage medium
WO2019071898A1 (en) Electronic device, database query script generation method and storage medium
US9037614B1 (en) Secondary mappings to enable code changes without schema updates
CN108874924B (en) Method and device for creating search service and computer-readable storage medium
CN111400308B (en) Processing method of cache data, electronic device and readable storage medium
WO2019134340A1 (en) Salary calculation method, application server, and computer readable storage medium
CN107656729B (en) List view updating apparatus, method and computer-readable storage medium
WO2018223941A1 (en) Device and method for issuing multiple insurance policies and computer readable storage medium
CN107679056B (en) Method for generating SQL (structured query language) statement, electronic device and readable storage medium
CN111177113B (en) Data migration method, device, computer equipment and storage medium
WO2019136812A1 (en) Electronic device, data calling log generation and query method, and storage medium
WO2020015170A1 (en) Interface invoking method and apparatus, and computer-readable storage medium
CN109491962B (en) File directory tree management method and related device
CN110837366A (en) Form generation method, electronic device and computer readable storage medium
WO2016131360A1 (en) Widget file generation method and apparatus
CN112464625A (en) Receipt generation method and device, computer equipment and storage medium
CN111723077A (en) Data dictionary maintenance method and device and computer equipment
CN108763341B (en) Electronic device, automatic table building method and storage medium
CN110727425A (en) Electronic device, form data verification method and computer-readable storage medium
CN110727777A (en) Knowledge graph management method and device, computer equipment and storage medium
WO2019091023A1 (en) Video file uploading method, server and readable storage medium

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS (EPO FORM 1205A DATED 30.09.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18866774

Country of ref document: EP

Kind code of ref document: A1