CN113448980A - Method and device for generating SQL (structured query language) statement and electronic equipment - Google Patents

Method and device for generating SQL (structured query language) statement and electronic equipment Download PDF

Info

Publication number
CN113448980A
CN113448980A CN202110680026.5A CN202110680026A CN113448980A CN 113448980 A CN113448980 A CN 113448980A CN 202110680026 A CN202110680026 A CN 202110680026A CN 113448980 A CN113448980 A CN 113448980A
Authority
CN
China
Prior art keywords
sql statement
parameter information
sql
parameter
preset
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
Application number
CN202110680026.5A
Other languages
Chinese (zh)
Inventor
刘超
陈合
王康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202110680026.5A priority Critical patent/CN113448980A/en
Publication of CN113448980A publication Critical patent/CN113448980A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING; 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

Abstract

The application relates to the technical field of databases, and discloses a method for generating SQL statements, which comprises the following steps: acquiring parameter information from a preset Excel file, wherein the parameter information corresponds to a parameter name; and assigning the parameter information to a field corresponding to the parameter name in a preset SQL statement template to obtain the SQL statement to be operated. By adopting the method provided by the application, the parameter information can be modified based on the business requirement, so that different parameter information is assigned to the field corresponding to the parameter name in the preset SQL statement template, different SQL statements are obtained, developers do not need to construct the SQL statement for many times, the SQL statement can be quickly obtained, development resources are reduced, and development cost is reduced. The application also discloses a device and electronic equipment for generating the SQL statement.

Description

Method and device for generating SQL (structured query language) statement and electronic equipment
Technical Field
The application relates to the technical field of databases, in particular to a method and a device for generating an SQL statement and electronic equipment.
Background
In some existing business project management, processing of database data is often involved, such as accessing data, querying data, deleting data, and the like, all of the data processing logics need to be implemented by SQL (Structured query language) statements, and implementation of the data processing logics mostly involves industry knowledge, developers need to know business requirements, and when new business requirements exist, corresponding SQL statements need to be rewritten to implement corresponding logics.
In the process of implementing the embodiments of the present disclosure, it is found that at least the following problems exist in the related art:
when the business demand is more, a large amount of development resources need to be invested, the cost of development manpower is higher, and the development efficiency is lower.
Disclosure of Invention
The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview nor is intended to identify key/critical elements or to delineate the scope of such embodiments but rather as a prelude to the more detailed description that is presented later.
The embodiment of the disclosure provides a method and a device for generating an SQL (structured query language) statement and electronic equipment, so as to quickly generate the SQL statement.
In some embodiments, the method for generating an SQL statement comprises: acquiring parameter information from a preset Excel file, wherein the parameter information corresponds to a parameter name; and assigning the parameter information to a field corresponding to the parameter name in a preset SQL statement template to obtain the SQL statement to be operated.
In some embodiments, the above apparatus for generating an SQL statement comprises: the first acquisition module is configured to acquire parameter information corresponding to the parameter name from a preset Excel file; the parameter information corresponds to a parameter name; and the second acquisition module is configured to assign the parameter information to a field corresponding to the parameter name in a preset SQL statement template to acquire the SQL statement to be operated.
In some embodiments, the above apparatus for generating an SQL statement comprises: a processor and a memory storing program instructions, the processor being configured to, when executing the program instructions, perform the method for generating SQL statements described above.
In some embodiments, the electronic device includes the above apparatus for generating an SQL statement.
The method, the device and the electronic equipment for generating the SQL statement provided by the embodiment of the disclosure can achieve the following technical effects: obtaining parameter information corresponding to parameter names from a preset Excel file, and assigning the parameter information to fields corresponding to the parameter names in a preset SQL statement template to obtain the SQL statements to be run. Therefore, the parameter information can be modified based on business requirements, different parameter information is assigned to the fields corresponding to the parameter names in the preset SQL statement template, different SQL statements are obtained, developers do not need to build the SQL statements for multiple times, the SQL statements can be generated quickly, development resources are reduced, and development cost is reduced.
The foregoing general description and the following description are exemplary and explanatory only and are not restrictive of the application.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the accompanying drawings and not in limitation thereof, in which elements having the same reference numeral designations are shown as like elements and not in limitation thereof, and wherein:
FIG. 1 is a schematic diagram of a method for generating an SQL statement according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of an apparatus for generating an SQL statement according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of another apparatus for generating an SQL statement according to an embodiment of the present disclosure.
Detailed Description
So that the manner in which the features and elements of the disclosed embodiments can be understood in detail, a more particular description of the disclosed embodiments, briefly summarized above, may be had by reference to the embodiments, some of which are illustrated in the appended drawings. In the following description of the technology, for purposes of explanation, numerous details are set forth in order to provide a thorough understanding of the disclosed embodiments. However, one or more embodiments may be practiced without these details. In other instances, well-known structures and devices may be shown in simplified form in order to simplify the drawing.
The terms "first," "second," and the like in the description and in the claims, and the above-described drawings of embodiments of the present disclosure, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the present disclosure described herein may be made. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions.
The term "plurality" means two or more unless otherwise specified.
In the embodiment of the present disclosure, the character "/" indicates that the preceding and following objects are in an or relationship. For example, A/B represents: a or B.
The term "and/or" is an associative relationship that describes objects, meaning that three relationships may exist. For example, a and/or B, represents: a or B, or A and B.
With reference to fig. 1, an embodiment of the present disclosure provides a method for generating an SQL statement, including:
step S101, acquiring parameter information from a preset Excel file, wherein the parameter information corresponds to a parameter name;
and step S102, assigning the parameter information to a field corresponding to the parameter name in a preset SQL statement template to obtain the SQL statement to be operated.
By adopting the method for generating the SQL statement provided by the embodiment of the disclosure, the parameter information corresponding to the parameter name is acquired from the preset Excel file, and the parameter information is assigned to the field corresponding to the parameter name in the preset SQL statement template, so that the SQL statement to be operated is acquired, the parameter information can be modified based on the business requirement, different parameter information is assigned to the field corresponding to the parameter name in the preset SQL statement template, different SQL statements are acquired, developers do not need to construct the SQL statement for multiple times, the SQL statement can be generated quickly, development resources are reduced, and development cost is reduced.
Optionally, the parameter name comprises an incoming name and/or an outgoing name.
Optionally, the SQL statement template is stored in an Excel file.
Optionally, obtaining parameter information from a preset Excel file includes: and acquiring parameter information from a preset Excel file under the condition of receiving the trigger information.
Optionally, trigger information sent by the front-end page is received. Optionally, the trigger information includes query trigger information, delete trigger information, add trigger information, modify trigger information, and the like.
Optionally, the preset SQL statement template includes a query SQL statement template, a delete SQL statement template, an add SQL statement template, and a modify SQL statement template.
Optionally, assigning the parameter information to a field corresponding to the parameter name in a preset SQL statement template to obtain the SQL statement to be executed, where the method includes: matching a corresponding SQL statement template in a preset data table according to the trigger information; assigning the parameter information to a field corresponding to the parameter name in the SQL statement template corresponding to the trigger information to obtain an SQL statement to be operated; the preset data table stores the corresponding relation between the trigger information and the SQL statement template.
In some embodiments, the preset data table stores a correspondence between the query trigger information and the query SQL statement template, a correspondence between the delete trigger information and the delete SQL statement template, a correspondence between the add trigger information and the add SQL statement template, a correspondence between the modify trigger information and the modify SQL statement template, and the like.
In some embodiments, under the condition that query trigger information is received, parameter information corresponding to parameter names is obtained from an Excel file, and the parameter information is assigned to fields corresponding to the parameter names in a query SQL statement template, so as to obtain the SQL statements to be queried. Optionally, the SQL statement to be queried is used to query the database for data information corresponding to the parameter information.
In some embodiments, under the condition that deletion trigger information is received, parameter information corresponding to parameter names is obtained from an Excel file, and the parameter information is assigned to fields corresponding to the parameter names in a deleted SQL statement template, so that SQL statements to be deleted are obtained. Optionally, the SQL statement to be deleted is used to delete the data information corresponding to the parameter information in the database.
In some embodiments, under the condition that the adding trigger information is received, parameter information corresponding to parameter names is obtained from an Excel file, the parameter information is assigned to fields corresponding to the parameter names in the adding SQL statement template, and the SQL statement to be added is obtained. Optionally, the SQL statement to be added is used to add data information corresponding to the parameter information in the database.
In some embodiments, under the condition that modification trigger information is received, parameter information corresponding to a parameter name is obtained from an Excel file, and the parameter information is assigned to a field corresponding to the parameter name in a modified SQL statement template, so as to obtain an SQL statement to be modified. Optionally, the SQL statement to be modified is used to modify the data information corresponding to the parameter information in the database.
Optionally, in a case of receiving trigger information sent by a front-end page, the method further includes: receiving target parameter information sent by a front-end page, and updating the target parameter information into parameter information in a preset Excel file; the target parameter information corresponds to a parameter name.
Optionally, after obtaining the SQL statement to be executed, the method further includes: and sending the SQL sentence to be executed to a background server, and triggering the background server to execute the SQL sentence to be executed.
Optionally, triggering the background server to execute the SQL statement to be executed includes: and triggering the background server to run the SQL sentence to be run by using a preset persistent layer framework.
Optionally, the background server is triggered to run the SQL statement to be run by using the preset persistent layer framework Mybatis. And querying, modifying, adding or deleting the data information corresponding to the parameter information in the database.
Optionally, after obtaining the parameter information from the preset Excel file, the method further includes: acquiring database source information corresponding to the parameter information from a preset Excel file; and establishing connection with the database corresponding to the database source information.
Optionally, sending the SQL statement to be executed to the background server, including: and sending the SQL sentence to be run to a background server corresponding to the database with the established connection.
Optionally, the database comprises: MySql open source databases or Oracle distributed databases.
Thus, under the condition of receiving the trigger information, receiving the target parameter information sent by the front end page, and updating the parameter information in the preset Excel file according to the target parameter information, acquiring parameter information corresponding to parameter names from a preset Excel file, assigning the parameter information to fields corresponding to the parameter names in the SQL statement template corresponding to the trigger information to acquire SQL statements to be run, and sending the SQL sentence to be run to a background server corresponding to the database with the established connection, triggering the background server to run the SQL sentence to be run by using a preset persistent layer frame, therefore, the data information corresponding to the parameter information is inquired, modified, added or deleted in the database, under the condition that no API (Application Programming Interface) Interface exists, and operating the SQL sentence to be operated by using the persistent layer framework to complete data interaction between the front-end page and the database.
In some embodiments, in the case of receiving query trigger information sent by the front-end page, target parameter information sent by the front-end page is received, and updating the parameter information in the preset Excel file according to the target parameter information, acquiring parameter information corresponding to parameter names from a preset Excel file, assigning the parameter information to fields corresponding to the parameter names in an inquiry SQL statement template to acquire SQL statements to be inquired, sending the SQL statements to be inquired to a background server corresponding to a database which is connected with the background server, triggering the background server to run the SQL statements to be inquired by utilizing preset persistent layer frames Mybatis to realize the inquiry of data information corresponding to the parameter information in the database, therefore, under the condition that no API interface exists, the SQL sentence to be operated is operated by using the persistent layer framework, and data interaction between the front-end page and the database is completed.
With reference to fig. 2, an apparatus for generating an SQL statement according to an embodiment of the present disclosure is characterized by comprising: a first acquisition module 201 and a second acquisition module 202; the first obtaining module 201 is configured to obtain parameter information corresponding to a parameter name from a preset Excel file; the second obtaining module 202 is configured to assign the parameter information to a field corresponding to the parameter name in a preset SQL statement template, so as to obtain the to-be-executed SQL statement.
According to the device for generating the SQL statement, the first acquisition module acquires the parameter information corresponding to the parameter name from the preset Excel file, and the second acquisition module assigns the parameter information to the field corresponding to the parameter name in the preset SQL statement template to acquire the SQL statement to be operated. Therefore, the parameter information can be modified based on business requirements, different parameter information is assigned to the fields corresponding to the parameter names in the preset SQL statement template, different SQL statements are obtained, developers do not need to build the SQL statements for multiple times, the SQL statements can be generated quickly, development resources are reduced, and development cost is reduced.
Optionally, the parameter name comprises an incoming name and/or an outgoing name.
Optionally, the SQL statement template is stored in an Excel file.
Optionally, the first obtaining module 201 is configured to, in a case that the trigger information is received, obtain the parameter information from a preset Excel file.
Optionally, the first obtaining module 201 is configured to receive trigger information sent by a front-end page.
Optionally, the second obtaining module 202 is configured to match a corresponding SQL statement template in a preset data table according to the trigger information; assigning the parameter information to a field corresponding to the parameter name in the SQL statement template corresponding to the trigger information to obtain an SQL statement to be operated; the preset data table stores the corresponding relation between the trigger information and the SQL statement template.
In some embodiments, the preset data table stores a correspondence between the query trigger information and the query SQL statement template, a correspondence between the delete trigger information and the delete SQL statement template, a correspondence between the add trigger information and the add SQL statement template, a correspondence between the modify trigger information and the modify SQL statement template, and the like.
In some embodiments, when the first obtaining module receives the query trigger information, the second obtaining module obtains the parameter information corresponding to the parameter name from the Excel file, and assigns the parameter information to the field corresponding to the parameter name in the query SQL statement template to obtain the to-be-queried SQL statement.
In some embodiments, when the first obtaining module receives the deletion trigger information, the second obtaining module obtains parameter information corresponding to the parameter name from the Excel file, and assigns the parameter information to a field corresponding to the parameter name in the deletion SQL statement template to obtain the SQL statement to be deleted.
In some embodiments, when the first obtaining module receives the add trigger information, the second obtaining module obtains parameter information corresponding to the parameter name from the Excel file, and assigns the parameter information to a field corresponding to the parameter name in the add SQL statement template to obtain the SQL statement to be added.
In some embodiments, when the first obtaining module receives the modification trigger information, the second obtaining module obtains the parameter information corresponding to the parameter name from the Excel file, and assigns the parameter information to the field corresponding to the parameter name in the modified SQL statement template to obtain the SQL statement to be modified.
Optionally, the first obtaining module 201 is configured to receive target parameter information sent by a front-end page, and update parameter information in a preset Excel file with the target parameter information; the target parameter information corresponds to a parameter name.
Optionally, the apparatus for generating an SQL statement further includes a sending module, configured to send the to-be-executed SQL statement to the background server, and trigger the background server to execute the to-be-executed SQL statement.
Optionally, the sending module is configured to send the SQL statement to be executed to the background server, and trigger the persistent layer framework of the background server to execute the SQL statement to be executed.
Optionally, the sending module is configured to send the SQL statement to be executed to the background server, and trigger the background server to execute the SQL statement to be executed by using a preset persistent layer framework Mybatis.
Optionally, the apparatus for generating an SQL statement further includes a third obtaining module, configured to obtain database source information corresponding to the parameter information from a preset Excel file.
Optionally, the third obtaining module is configured to establish a connection with a database corresponding to the database source information.
Optionally, the sending module is configured to send the SQL statement to be executed to a background server corresponding to the database with which the connection is established.
Thus, under the condition that the first acquisition module receives the trigger information, the target parameter information sent by the front-end page is received, the parameter information in the preset Excel file is updated by the target parameter information, the parameter information corresponding to the parameter name is acquired from the preset Excel file by the second acquisition module, the parameter information is assigned to the field corresponding to the parameter name in the SQL statement template corresponding to the trigger information, the SQL statement to be run is acquired, the SQL statement to be run is sent to the background server corresponding to the database which is connected with the established database by the sending module, the background server is triggered to run the SQL statement to be run by utilizing the preset persistent layer frame, so that the data information corresponding to the parameter information is inquired, modified, added or deleted in the database, and under the condition that no API (Application Programming Interface) Interface exists, and operating the SQL sentence to be operated by using the persistent layer framework to complete data interaction between the front-end page and the database.
As shown in fig. 3, an apparatus for generating an SQL statement according to an embodiment of the present disclosure includes a processor (processor)300 and a memory (memory) 301. Optionally, the apparatus may also include a Communication Interface 302 and a bus 303. The processor 300, the communication interface 302 and the memory 301 may communicate with each other via a bus 303. The communication interface 302 may be used for information transfer. The processor 300 may call logic instructions in the memory 301 to perform the method for generating SQL statements of the above embodiments.
According to the device for generating the SQL statement, the parameter information corresponding to the parameter name is acquired from the preset Excel file, the parameter information is assigned to the field corresponding to the parameter name in the preset SQL statement template, and the SQL statement to be operated is acquired.
In addition, the logic instructions in the memory 301 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products.
The memory 301 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, such as program instructions/modules corresponding to the methods in the embodiments of the present disclosure. The processor 300 executes functional applications and data processing, i.e., implements the method for generating SQL statements in the above embodiments, by executing program instructions/modules stored in the memory 301.
The memory 301 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. Further, the memory 301 may include a high-speed random access memory, and may also include a nonvolatile memory.
The embodiment of the disclosure provides electronic equipment, which comprises the device for generating the SQL statement.
Optionally, the electronic device comprises a computer.
The equipment obtains the parameter information corresponding to the parameter name from the preset Excel file, assigns the parameter information to the field corresponding to the parameter name in the preset SQL statement template, and obtains the SQL statement to be operated.
Embodiments of the present disclosure provide a computer-readable storage medium storing computer-executable instructions configured to perform the above-described method for generating an SQL statement.
Embodiments of the present disclosure provide a computer program product comprising a computer program stored on a computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the above-described method for generating SQL statements.
The computer-readable storage medium described above may be a transitory computer-readable storage medium or a non-transitory computer-readable storage medium.
The technical solution of the embodiments of the present disclosure may be embodied in the form of a software product, where the computer software product is stored in a storage medium and includes one or more instructions to enable a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present disclosure. And the aforementioned storage medium may be a non-transitory storage medium comprising: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes, and may also be a transient storage medium.
The above description and drawings sufficiently illustrate embodiments of the disclosure to enable those skilled in the art to practice them. Other embodiments may incorporate structural, logical, electrical, process, and other changes. The examples merely typify possible variations. Individual components and functions are optional unless explicitly required, and the sequence of operations may vary. Portions and features of some embodiments may be included in or substituted for those of others. Furthermore, the words used in the specification are words of description only and are not intended to limit the claims. As used in the description of the embodiments and the claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. Similarly, the term "and/or" as used in this application is meant to encompass any and all possible combinations of one or more of the associated listed. Furthermore, the terms "comprises" and/or "comprising," when used in this application, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. Without further limitation, an element defined by the phrase "comprising an …" does not exclude the presence of other like elements in a process, method or apparatus that comprises the element. In this document, each embodiment may be described with emphasis on differences from other embodiments, and the same and similar parts between the respective embodiments may be referred to each other. For methods, products, etc. of the embodiment disclosures, reference may be made to the description of the method section for relevance if it corresponds to the method section of the embodiment disclosure.
Those of skill in the art would appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software may depend upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments. It can be clearly understood by the skilled person that, for convenience and brevity of description, the specific working processes of the system, the apparatus and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments disclosed herein, the disclosed methods, products (including but not limited to devices, apparatuses, etc.) may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units may be merely a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form. The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to implement the present embodiment. In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. In the description corresponding to the flowcharts and block diagrams in the figures, operations or steps corresponding to different blocks may also occur in different orders than disclosed in the description, and sometimes there is no specific order between the different operations or steps. For example, two sequential operations or steps may in fact be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. Each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

Claims (10)

1. A method for generating an SQL statement, comprising:
acquiring parameter information from a preset Excel file, wherein the parameter information corresponds to a parameter name;
and assigning the parameter information to a field corresponding to the parameter name in a preset SQL statement template to obtain the SQL statement to be operated.
2. The method according to claim 1, wherein obtaining parameter information from a preset Excel file comprises:
and acquiring parameter information from a preset Excel file under the condition of receiving the trigger information.
3. The method of claim 1, wherein after obtaining the SQL statement to be run, further comprising:
and sending the SQL sentence to be operated to a background server, and triggering the background server to operate the SQL sentence to be operated.
4. The method according to claim 3, wherein triggering the background server to execute the SQL statement to be executed comprises:
and triggering the background server to operate the SQL sentence to be operated by using a preset persistent layer framework.
5. An apparatus for generating an SQL statement, comprising:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is configured to acquire parameter information from a preset Excel file, and the parameter information corresponds to a parameter name;
and the second acquisition module is configured to assign the parameter information to a field corresponding to the parameter name in a preset SQL statement template to acquire the SQL statement to be operated.
6. The device according to claim 5, wherein the first obtaining module is configured to obtain the parameter information from a preset Excel file in case of receiving the trigger information.
7. The apparatus according to claim 5, further comprising a sending module configured to send the to-be-executed SQL statement to a background server, and trigger the background server to execute the to-be-executed SQL statement.
8. The apparatus according to claim 7, wherein the sending module sends the SQL statement to be executed to a backend server, and triggers a persistent layer framework of the backend server to execute the SQL statement to be executed.
9. An apparatus for generating SQL statements comprising a processor and a memory storing program instructions, characterized in that the processor is configured to execute the method for generating SQL statements according to any of claims 1 to 4 when executing the program instructions.
10. An electronic device, characterized in that it comprises means for generating SQL statements according to any of claims 5 to 9.
CN202110680026.5A 2021-06-18 2021-06-18 Method and device for generating SQL (structured query language) statement and electronic equipment Pending CN113448980A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110680026.5A CN113448980A (en) 2021-06-18 2021-06-18 Method and device for generating SQL (structured query language) statement and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110680026.5A CN113448980A (en) 2021-06-18 2021-06-18 Method and device for generating SQL (structured query language) statement and electronic equipment

Publications (1)

Publication Number Publication Date
CN113448980A true CN113448980A (en) 2021-09-28

Family

ID=77811808

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110680026.5A Pending CN113448980A (en) 2021-06-18 2021-06-18 Method and device for generating SQL (structured query language) statement and electronic equipment

Country Status (1)

Country Link
CN (1) CN113448980A (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009026163A (en) * 2007-07-23 2009-02-05 Fujitsu Ltd Database verification method and device
CN105843945A (en) * 2016-04-08 2016-08-10 联动优势科技有限公司 Report generation method and system
CN107679056A (en) * 2017-06-25 2018-02-09 平安科技(深圳)有限公司 Generate method, electronic installation and the readable storage medium storing program for executing of SQL statement
CN107798026A (en) * 2016-09-05 2018-03-13 北京京东尚科信息技术有限公司 Data query method and apparatus
CN109062925A (en) * 2018-06-06 2018-12-21 中国平安人寿保险股份有限公司 Automatically generate the method, apparatus, computer equipment and storage medium of insert sentence
CN109408526A (en) * 2018-10-12 2019-03-01 平安科技(深圳)有限公司 SQL statement generation method, device, computer equipment and storage medium
CN109739493A (en) * 2019-01-18 2019-05-10 宜创(北京)科技有限公司 Generation method, device, electronic equipment and the storage medium of data base manipulation statement
CN110019350A (en) * 2017-07-28 2019-07-16 北京京东尚科信息技术有限公司 Data query method and apparatus based on configuration information
CN110968591A (en) * 2018-09-30 2020-04-07 北京国双科技有限公司 Query statement generation method and device, storage medium and processor
CN111090666A (en) * 2019-11-29 2020-05-01 江苏苏宁物流有限公司 Data processing method, device and system and computer readable storage medium
CN112163000A (en) * 2020-08-31 2021-01-01 阿里巴巴集团控股有限公司 Data query method and device
CN112632098A (en) * 2020-12-18 2021-04-09 平安普惠企业管理有限公司 Dynamic generation method of structured query statement and related equipment
CN112650766A (en) * 2019-10-10 2021-04-13 腾讯科技(深圳)有限公司 Database data operation method, system and server
CN112965982A (en) * 2021-03-16 2021-06-15 中国平安财产保险股份有限公司 Table processing method, device, equipment and storage medium

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009026163A (en) * 2007-07-23 2009-02-05 Fujitsu Ltd Database verification method and device
CN105843945A (en) * 2016-04-08 2016-08-10 联动优势科技有限公司 Report generation method and system
CN107798026A (en) * 2016-09-05 2018-03-13 北京京东尚科信息技术有限公司 Data query method and apparatus
CN107679056A (en) * 2017-06-25 2018-02-09 平安科技(深圳)有限公司 Generate method, electronic installation and the readable storage medium storing program for executing of SQL statement
CN110019350A (en) * 2017-07-28 2019-07-16 北京京东尚科信息技术有限公司 Data query method and apparatus based on configuration information
CN109062925A (en) * 2018-06-06 2018-12-21 中国平安人寿保险股份有限公司 Automatically generate the method, apparatus, computer equipment and storage medium of insert sentence
CN110968591A (en) * 2018-09-30 2020-04-07 北京国双科技有限公司 Query statement generation method and device, storage medium and processor
CN109408526A (en) * 2018-10-12 2019-03-01 平安科技(深圳)有限公司 SQL statement generation method, device, computer equipment and storage medium
CN109739493A (en) * 2019-01-18 2019-05-10 宜创(北京)科技有限公司 Generation method, device, electronic equipment and the storage medium of data base manipulation statement
CN112650766A (en) * 2019-10-10 2021-04-13 腾讯科技(深圳)有限公司 Database data operation method, system and server
CN111090666A (en) * 2019-11-29 2020-05-01 江苏苏宁物流有限公司 Data processing method, device and system and computer readable storage medium
CN112163000A (en) * 2020-08-31 2021-01-01 阿里巴巴集团控股有限公司 Data query method and device
CN112632098A (en) * 2020-12-18 2021-04-09 平安普惠企业管理有限公司 Dynamic generation method of structured query statement and related equipment
CN112965982A (en) * 2021-03-16 2021-06-15 中国平安财产保险股份有限公司 Table processing method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
何佳慧: "智能订单分析及物流延迟预测平台的设计与实现", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *
韩刚: "基于SSM框架的热计量服务平台设计与实现", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *

Similar Documents

Publication Publication Date Title
CN106033439B (en) A kind of distributed transaction processing method and system
US11210181B2 (en) System and method for implementing data manipulation language (DML) on Hadoop
CN106156088B (en) Index data processing method, data query method and device
CN110908997B (en) Data blood relationship construction method and device, server and readable storage medium
CN103780686A (en) Method and system for customizing application approval procedure in cloud organization
CN103701653A (en) Processing method for interface hot plugging and unplugging configuration data and network configuration server
CN104881454A (en) Updating method and system of parameter
CN111859470B (en) Business data chaining method and device
CN113448980A (en) Method and device for generating SQL (structured query language) statement and electronic equipment
CN109729132B (en) Switch control method, device, equipment and computer readable storage medium
CN107992537B (en) Service attribute transmission method, device, computer equipment and storage medium
CN105893445A (en) Data processing method, server and terminal device
CN106815271A (en) Querying condition generation method and device
CN113537944A (en) Method and device for generating business instruction, electronic equipment and readable storage medium
CN113282580A (en) Method, storage medium and server for executing timed task
CN108491448B (en) Data pushing method and device
US9936015B2 (en) Method for building up a content management system
CN111723077A (en) Data dictionary maintenance method and device and computer equipment
CN112860954A (en) Real-time computing method and real-time computing system
CN111858760A (en) Data processing method and device for heterogeneous database
CN108196921B (en) Document development method and device, computer equipment and storage medium
CN112130830A (en) Interface generation method and device and electronic equipment
CN111552712A (en) Report data extraction method and device and computer equipment
CN111046106A (en) Cache data synchronization method, device, equipment and medium
CN111047434A (en) Operation record generation method and device, computer equipment and storage medium

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