CN113641698B - Method and device for generating continuous table query code, electronic equipment and computer readable storage medium - Google Patents

Method and device for generating continuous table query code, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN113641698B
CN113641698B CN202110953990.0A CN202110953990A CN113641698B CN 113641698 B CN113641698 B CN 113641698B CN 202110953990 A CN202110953990 A CN 202110953990A CN 113641698 B CN113641698 B CN 113641698B
Authority
CN
China
Prior art keywords
data
groups
data sets
relation
connection
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.)
Active
Application number
CN202110953990.0A
Other languages
Chinese (zh)
Other versions
CN113641698A (en
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.)
Chengdu Shuzhilian Technology Co Ltd
Original Assignee
Chengdu Shuzhilian Technology 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 Chengdu Shuzhilian Technology Co Ltd filed Critical Chengdu Shuzhilian Technology Co Ltd
Priority to CN202110953990.0A priority Critical patent/CN113641698B/en
Publication of CN113641698A publication Critical patent/CN113641698A/en
Application granted granted Critical
Publication of CN113641698B publication Critical patent/CN113641698B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a method, a device, electronic equipment and a computer readable storage medium for generating a continuous table query code, wherein the method comprises the following steps: determining at least two groups of data sets in a database, and displaying data tables corresponding to the at least two groups of data sets in a main interface; in a main interface, receiving an association relationship between data tables corresponding to at least two groups of data sets input by a user; in a main interface, receiving a query result field corresponding to the association relation, which is input by a user; and generating a query code according to the association relation between the data tables corresponding to at least two groups of data sets and the query result field corresponding to the association relation. The query codes of the continuous table are not required to be written manually, and a user can automatically generate the query codes of the continuous table according to the association relation between the data tables input by the user and the query result field, so that the code generation efficiency is improved.

Description

Method and device for generating continuous table query code, electronic equipment and computer readable storage medium
Technical Field
The present invention relates to the field of computers, and in particular, to a method and apparatus for generating a linked list query code, an electronic device, and a computer readable storage medium.
Background
In the prior art, the automatic generation code generally only generates data tables of a single database, and because no association relationship is established between the data tables, when data in different data tables need to be queried, for example: if the data in the data table B needs to be queried according to the data of the data table a, a coder needs to write a query code so that the data of the data table B can be queried according to the data of the data table a.
The query mode needs to write the query code manually, has low efficiency, and is easy to make mistakes in manual coding, so that the query is wrong.
Disclosure of Invention
The invention aims at providing a continuous table query code generation method and device, electronic equipment and a computer readable storage medium, which can automatically generate continuous table query codes and improve efficiency.
Embodiments of the invention may be implemented as follows:
in a first aspect, an embodiment of the present invention provides a method for generating a linked list query code, where the method includes:
determining at least two groups of data sets in a database, and displaying data tables corresponding to the at least two groups of data sets in a main interface; wherein the database comprises a plurality of groups of data sets;
in the main interface, receiving the association relationship between data tables corresponding to at least two groups of data sets input by a user;
receiving a query result field corresponding to the association relation, which is input by a user, in the main interface;
and generating a query code according to the association relation between the data tables corresponding to at least two groups of data sets and the query result field corresponding to the association relation.
According to the technical scheme, the query codes of the continuous table do not need to be written manually, and a user can automatically generate the query codes of the continuous table according to the association relation between the data tables input by the user and the query result field, so that the code generation efficiency is improved.
In an optional embodiment, the step of receiving, in the main interface, an association relationship between data tables corresponding to at least two sets of data sets input by a user includes:
in the main interface, receiving the connection line relation between the data tables corresponding to at least two groups of data sets input by a user and the pointing relation of each connection line;
obtaining a table connection relation between the data tables corresponding to the at least two groups of data sets according to the connection relation between the data tables corresponding to the at least two groups of data sets and the pointing relation of each connection;
receiving editing operation of a user on the connection relation of each table;
determining the table connection conditions of the table connection relations according to the editing operation;
and determining the association relation between the data tables corresponding to at least two groups of data sets based on each table connection relation and the table connection condition corresponding to the table connection relation.
Through the technical scheme, the association relation among the data tables is manually established based on the visualized data tables corresponding to all the data sets in the preview database, the workload of establishing the association relation among the data tables by manual coding is reduced, the association relation among the data tables is determined based on the connection line, and the operation is more flexible.
In an alternative embodiment, the table join relationship includes any one of: left connection of data table, right connection of data table, inner connection of data table and all outer connection of data table.
Through the technical scheme, the connection relation is determined based on the connection line, so that the quick setting of the table connection relation is realized, and the realization of writing codes is not needed.
In an optional embodiment, the step of receiving, in the main interface, a query result field corresponding to the association relationship, where the query result field is input by a user, includes:
in the main interface, receiving a first selection operation of a data table field in a data table corresponding to at least two groups of data sets establishing an association relation by a user, wherein the first selection operation comprises at least one of the following steps: the method comprises the steps of performing full selection operation, partial checking operation or reverse selection operation on table fields in a data table corresponding to at least two groups of data sets;
and determining a query result field corresponding to the association relation according to the first selection operation.
Through the scheme, the user performs the first selection operation on the data table fields in the data tables corresponding to at least two groups of data sets, so that the corresponding query result fields are determined, and the problem that in the prior art, the fields in a plurality of data tables are used as the query result fields, so that the query result is inaccurate is avoided. The user can set the required query result field by himself, which can increase the accuracy of the query result and reduce the calculation amount of the query process.
In an alternative embodiment, the step of determining at least two sets of data sets in the database and displaying data tables corresponding to the at least two sets of data sets in the main interface includes:
obtaining table resources in a database;
receiving a second selection operation of at least two groups of data sets in the table resource by a user;
determining data tables corresponding to at least two groups of data sets according to the second selection operation:
receiving touch operation of a user on data tables corresponding to at least two groups of data sets;
and according to the touch operation, moving the data tables corresponding to at least two groups of data sets to a main interface for display.
Through the scheme, the touch operation of the data tables corresponding to at least two groups of data sets is performed, and the corresponding data tables are moved from the database to the main interface, so that a user can edit the association relation of the data tables, and the visual operation of the data tables is realized.
In an optional embodiment, after the step of generating the query code according to the association relationship between the data tables corresponding to the at least two sets of data sets and the query result field corresponding to the association relationship, the method further includes:
an extensible markup language configuration file of the query code and a configuration file of the structured query language are generated.
By the scheme, the extensible markup configuration file of the query code and the configuration file of the structured query language are generated, so that the code is stored, structured data independent of an application program or a provider is described and exchanged according to a unified method, and flexible nested structured query language sentences are adopted, so that the processing of the subsequent code is more convenient.
In an alternative embodiment, the table resource includes a table list corresponding to the data set and a table structure of each data table.
Through the scheme, the table resources comprise the table list, so that a user can quickly select from mass data according to the table list.
In a second aspect, an embodiment of the present invention provides a device for generating a linked list query code, where the device includes:
the first determining module is used for determining at least two groups of data sets in the database and displaying data tables corresponding to the at least two groups of data sets in the main interface; wherein the database comprises a plurality of groups of data sets;
the first input module is used for receiving the association relation between the data tables corresponding to at least two groups of data sets input by a user in the main interface;
the second input module is used for receiving the association relation input by the user in the main interface;
the generation module is used for generating a query code according to the association relation between the data tables corresponding to at least two groups of data sets and the query result field corresponding to the association relation.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the method for generating a linked list query code when executing the computer program.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the linked list query code generation method.
The application has the following beneficial effects:
determining at least two groups of data sets in a database, and displaying data tables corresponding to the at least two groups of data sets in a main interface; in a main interface, receiving an association relationship between data tables corresponding to at least two groups of data sets input by a user; in a main interface, receiving a query result field corresponding to the association relation, which is input by a user; and generating a query code according to the association relation between the data tables corresponding to at least two groups of data sets and the query result field corresponding to the association relation. The query codes of the continuous table are not required to be written manually, and a user can automatically generate the query codes of the continuous table according to the association relation between the data tables input by the user and the query result field, so that the code generation efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic block diagram of an electronic device according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a method for generating a linked list query code according to an embodiment of the present invention;
FIG. 3 is a second flowchart of a method for generating a linked list query code according to an embodiment of the present invention;
FIG. 4 is a third flow chart of a method for generating a linked list query code according to an embodiment of the present invention;
FIG. 5 is a flowchart of a method for generating a linked list query code according to an embodiment of the present invention;
fig. 6 is a block diagram of a device for generating a linked list query code according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
In the description of the present invention, it should be noted that, if the terms "upper", "lower", "inner", "outer", and the like indicate an azimuth or a positional relationship based on the azimuth or the positional relationship shown in the drawings, or the azimuth or the positional relationship in which the inventive product is conventionally put in use, it is merely for convenience of describing the present invention and simplifying the description, and it is not indicated or implied that the apparatus or element referred to must have a specific azimuth, be configured and operated in a specific azimuth, and thus it should not be construed as limiting the present invention.
Furthermore, the terms "first," "second," and the like, if any, are used merely for distinguishing between descriptions and not for indicating or implying a relative importance.
In the description of the present application, it should also be noted that, unless explicitly specified and limited otherwise, the terms "disposed," "mounted," "connected," and "connected" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the terms in this application will be understood by those of ordinary skill in the art in a specific context.
It should be noted that the features of the embodiments of the present invention may be combined with each other without conflict.
When it is desired to query data in different data tables, for example: if the data in the data table B needs to be queried according to the data of the data table a, a coder needs to write a query code so that the data of the data table B can be queried according to the data of the data table a.
However, through a great deal of research by the inventor, the method is low in efficiency, and manual coding is easy to make mistakes, so that the inquiry is wrong.
In view of the above-mentioned problems, the present embodiment provides a method, apparatus, electronic device, and computer-readable storage medium for generating a linked list query code, which can solve the problem of low efficiency of manual coding, and the following details the scheme provided in the present embodiment.
The embodiment provides an electronic device capable of generating a linked list query code. In one possible implementation, the electronic device may be a user terminal, for example, the electronic device may be, but is not limited to, a server, a smart phone, a Personal computer (PersonalComputer, PC), a tablet computer, a Personal digital assistant (Personal DigitalAssistant, PDA), a mobile internet device (Mobile Internet Device, MID), or the like.
The electronic device may have a component capable of generating a linked list query code, for example, a central processing unit (CentralProcessing Unit, CPU), a graphics processor (Graphic Processing Unit, GPU), or the like, to thereby perform the linked list query code generation method provided by the present embodiment.
In another possible implementation, the electronic device may also be a server capable of communicating with the user terminal. The server can determine at least two groups of data sets in the database, and display data tables corresponding to the at least two groups of data sets in the main interface; wherein the database comprises a plurality of groups of data sets; in the main interface, receiving the association relationship between data tables corresponding to at least two groups of data sets input by a user; receiving a query result field corresponding to the association relation, which is input by a user, in the main interface; and generating a query code according to the association relation between the data tables corresponding to at least two groups of data sets and the query result field corresponding to the association relation.
Referring to fig. 1, a schematic diagram of the electronic device 100 is shown. The electronic device 100 comprises a linked list query code generation means 110, a memory 120, a processor 130, and a communication unit 140.
The memory 120, the processor 130, and the communication unit 140 are electrically connected directly or indirectly to each other to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The linked list query code generation apparatus 110 includes at least one software function module that may be stored in the memory 120 in the form of software or Firmware (Firmware) or cured in an Operating System (OS) of the electronic device 100. The processor 130 is configured to execute executable modules stored in the memory 120, such as software functional modules and computer programs included in the table lookup code generation apparatus 110. The linked list query code generation apparatus 110 implements the linked list query code generation method when the computer executable instructions are executed by a processor.
The Memory 120 may be, but is not limited to, random access Memory (RandomAccess Memory, RAM), read Only Memory (ROM), programmable Read Only Memory (Programmable Read-OnlyMemory, PROM), erasable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc. The memory 120 is used for storing a program, and the processor 130 executes the program after receiving an execution instruction. The communication unit 140 is used for transmitting and receiving data through a network.
The processor 130 may be an integrated circuit chip with signal processing capabilities. The processor may be a general-purpose processor, including a central processing unit (CentralProcessing Unit, CPU), a Network Processor (NP), etc.; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor.
Referring to fig. 2, fig. 2 is a flowchart of a method for generating a linked list query code applied to the electronic device 100 shown in fig. 1, and the method includes the following steps.
Step 201: at least two groups of data sets are determined in the database, and data tables corresponding to the at least two groups of data sets are displayed in the main interface.
Wherein the database contains a plurality of groups of data sets.
Step 202: and in the main interface, receiving the association relationship between the data tables corresponding to at least two groups of data sets input by the user.
Step 203: and in the main interface, receiving a query result field corresponding to the association relation, which is input by a user.
Step 204: and generating a query code according to the association relation between the data tables corresponding to at least two groups of data sets and the query result field corresponding to the association relation.
The database contains a plurality of groups of data sets, the data sets can be data tables, and different data sets are contained in different data tables.
The data sets determined from the database may be two sets, three sets, four sets, five sets, etc., which are not particularly limited in the embodiment of the present invention.
And moving the at least two groups of data sets into a main interface to realize visualization of the data tables corresponding to the at least two groups of data sets, wherein a user can establish the table connection relation of the data tables in real time.
And establishing an association relationship between at least two data tables, and selecting the table A and dragging a connecting line to the table B so as to establish the association relationship between the table A and the table B. Or directly connecting the table A and the table B through a connecting line, and determining the association relation between the two data tables based on the connecting line.
The user of the query result field can set the query result field by himself, and if the user does not set the query result field, the default query result field is obtained.
Based on the association relation between the data tables corresponding to at least two groups of data sets and the query result field corresponding to the association relation, a query code is generated without encoding the query relation between the two data tables, so that the problem that the code error is caused by manual encoding, the query function cannot be realized, and the generation efficiency of the query code is improved.
Based on the query code, an extensible markup language configuration file and a configuration file of a structured query language are generated.
In an electronic computer, a markup refers to a symbol of information that can be understood by the computer, and by means of an extensible markup language configuration file markup, various information such as articles and the like can be processed between the computers. It can be used to mark data, define data types, and is a source language that allows users to define their own mark-up language. It is well suited for web transport, providing a unified approach to describe and exchange structured data independent of applications or vendors.
The structured query language is a high-level, non-procedural programming language that allows users to work on high-level data structures. The method does not require the user to specify a data storage method or the user to know a specific data storage mode, so that different database systems with completely different substructures can use the same structured query language as an interface for data input and management. The structured query language statement can be nested, which gives it great flexibility and powerful functionality.
Determining at least two groups of data sets in a database, and displaying data tables corresponding to the at least two groups of data sets in a main interface; in a main interface, receiving an association relationship between data tables corresponding to at least two groups of data sets input by a user; in a main interface, receiving a query result field corresponding to the association relation, which is input by a user; and generating a query code according to the association relation between the data tables corresponding to at least two groups of data sets and the query result field corresponding to the association relation. The query codes of the continuous table are not required to be written manually, and a user can automatically generate the query codes of the continuous table according to the association relation between the data tables input by the user and the query result field, so that the code generation efficiency is improved.
In order to efficiently establish the relation between the linked lists, in another embodiment of the present application, as shown in fig. 3, a method for generating a linked list query code is provided, which specifically includes the following steps:
step 202-1: in the main interface, the connection line relation between the data tables corresponding to at least two groups of data sets input by a user and the pointing relation of each connection line are received.
Step 202-2: and obtaining the table connection relation between the data tables corresponding to the at least two groups of data sets according to the connection relation between the data tables corresponding to the at least two groups of data sets and the pointing relation of each connection.
Step 202-3: and receiving the editing operation of the user on the connection relation of each table.
Step 202-4: and determining the table connection conditions of the table connection relations according to the editing operation.
Step 202-5: and determining the association relation between the data tables corresponding to at least two groups of data sets based on the table connection relation and the table connection condition corresponding to the table connection relation.
The main interface may be a visual interface of a browser, a display interface of a computer, etc.
For example: the user may input a connection, connect tables a and B through the connection, and the connection has a pointing relationship, and may point to connect tables a and B from table a to table B. The connection of connection table a and connection table B points from table B to table a. And the connection line connecting the table B and the table B may be a straight line or a curve, which is not particularly limited in the embodiment of the present invention.
The table contact relation of the data table comprises: left connection of data table, right connection of data table, internal connection of data table and all-external connection of data table. Left connection of data table: the return includes all records in the left table and records in the right table with equal connection fields. Right connection of data table: the return includes all records in the right table and records in the left table with equal connection fields. Interconnection of data tables: only rows in the two tables with equal connection fields are returned. All-external connection of data table: and returning all records in the left and right tables and records with equal connection fields in the left and right tables.
And receiving the editing operation of the user on the connection relation of each table, determining the connection condition of each table, and designating the fields in the tables participating in connection as the connection condition when creating the table connection.
And finally, determining the association relation between the data tables based on the table connection relations and the table connection conditions corresponding to the table connection relations.
Based on the visualized data tables corresponding to all data sets in the preview database, the association relation among a plurality of data tables is established manually, the workload of establishing the association relation among the data tables by manual coding is reduced, and the association relation among the data tables is determined based on connection lines, so that the operation is more flexible.
How to determine the query result field corresponding to the association relationship through the input of the user, in another embodiment of the present application, as shown in fig. 4, for the above step 203, a method for generating a continuous table query code is provided, which specifically includes the following steps:
step 203-1: and in the main interface, receiving a first selection operation of data table fields in the data tables corresponding to at least two groups of data sets establishing the association relation by the user.
Wherein the first selecting operation includes at least one of: and performing full selection operation, partial checking operation or reverse selection operation on table fields in the data tables corresponding to at least two groups of data sets.
Step 203-2: and determining a query result field corresponding to the association relation according to the first selection operation.
And selecting a query result field from the plurality of table fields establishing the connection relationship. According to different service requirements, the fields in the multiple data tables with the association relationship do not necessarily need to be used as the result fields of the query. Therefore, the fields in the tables can be selected in a full selection, a hook selection, a reverse selection and the like mode to be used as the query result fields.
The corresponding query result fields are determined through the first selection operation of the user on the data table fields in the data tables corresponding to at least two groups of data sets, so that the problem that in the prior art, the fields in a plurality of data tables are used as the query result fields, and the query result is inaccurate is avoided. The user can set the required query result field by himself, which can increase the accuracy of the query result and reduce the calculation amount of the query process.
In order to realize visualization of data tables corresponding to at least two sets of data sets, in another embodiment of the present application, as shown in fig. 5, for the step 201, a method for generating a continuous table query code is provided, which specifically includes the following steps:
step 201-1: table resources in the database are obtained.
Step 201-2: a second selection operation of the user to at least two sets of data sets in the table resource is received.
Step 201-3: and determining data tables corresponding to at least two groups of data sets according to the second selection operation.
Step 201-4: and receiving touch operation of a user on the data table corresponding to at least two groups of data sets.
Step 201-5: and according to the touch operation, moving the data tables corresponding to at least two groups of data sets to a main interface for display.
The table resources include a table list corresponding to the data set and a table structure for each data table.
The data table consists of three parts, table name, fields in the table and records of the table. The design of the data table structure is to define the file name of the data table, determine which fields the data table contains, the field name, field type and width of each field, and input these data into the computer. The list is a list of data tables corresponding to multiple groups of data sets contained in the database, and the list represents the table names of all the data tables in the database.
And receiving a second selection operation of the user on the different data sets, and generating a data table of the different data sets.
It should be noted that the second selection operation may be a click operation, a single click operation, a double click operation, a long operation, or the like, which is not particularly limited in the embodiment of the present invention.
And moving the corresponding data table from the database to the main interface for touch operation of the data tables corresponding to at least two groups of data sets, so that a user can edit the association relation of the data tables, and the visual operation of the data tables is realized.
Referring to fig. 6, the present embodiment further provides a table-linking query code generating device 110 applied to the electronic device 100 shown in fig. 1, where the table-linking query code generating device 110 includes:
a first determining module 111, configured to determine at least two sets of data sets in the database and display data tables corresponding to the at least two sets of data sets in the main interface; wherein the database comprises a plurality of groups of data sets;
a first input module 112, configured to receive, in the main interface, an association relationship between data tables corresponding to at least two sets of data sets input by a user;
a second input module 113, configured to receive, in the main interface, the association relationship with the user input;
the generating module 114 is configured to generate a query code according to an association relationship between data tables corresponding to at least two sets of data sets and a query result field corresponding to the association relationship.
Optionally, in some possible implementations, the first input module 112 is specifically configured to:
in the main interface, receiving the connection line relation between the data tables corresponding to at least two groups of data sets input by a user and the pointing relation of each connection line;
obtaining a table connection relation between the data tables corresponding to the at least two groups of data sets according to the connection relation between the data tables corresponding to the at least two groups of data sets and the pointing relation of each connection;
receiving editing operation of a user on the connection relation of each table;
determining the table connection conditions of the table connection relations according to the editing operation;
and determining the association relation between the data tables corresponding to at least two groups of data sets based on each table connection relation and the table connection condition corresponding to the table connection relation.
Optionally, in some possible implementations, the table connection relation includes any one of the following: left connection of data table, right connection of data table, inner connection of data table and all outer connection of data table.
Optionally, in some possible implementations, the second input module 113 is specifically configured to: in the main interface, receiving a first selection operation of a data table field in a data table corresponding to at least two groups of data sets establishing an association relation by a user, wherein the first selection operation comprises at least one of the following steps: the method comprises the steps of performing full selection operation, partial checking operation or reverse selection operation on table fields in a data table corresponding to at least two groups of data sets;
and determining a query result field corresponding to the association relation according to the first selection operation.
Optionally, in some possible implementations, the first determining module 111 is specifically configured to:
obtaining table resources in a database;
receiving a second selection operation of at least two groups of data sets in the table resource by a user;
determining data tables corresponding to at least two groups of data sets according to the second selection operation:
receiving touch operation of a user on data tables corresponding to at least two groups of data sets;
and according to the touch operation, moving the data tables corresponding to at least two groups of data sets to a main interface for display.
Optionally, in some possible implementations, the table-linked query code generating device 110 further includes: a profile generation module 115;
the configuration file generation module 115 is configured to generate an extensible markup language configuration file of the query code and a configuration file of the structured query language.
Optionally, in some possible implementations, the table resource includes a table list corresponding to the data set and a table structure of each data table.
In summary, the method includes determining at least two sets of data sets in a database, and displaying data tables corresponding to the at least two sets of data sets in a main interface; in a main interface, receiving an association relationship between data tables corresponding to at least two groups of data sets input by a user; in a main interface, receiving a query result field corresponding to the association relation, which is input by a user; and generating a query code according to the association relation between the data tables corresponding to at least two groups of data sets and the query result field corresponding to the association relation. The query codes of the continuous table are not required to be written manually, and a user can automatically generate the query codes of the continuous table according to the association relation between the data tables input by the user and the query result field, so that the code generation efficiency is improved.
The present application also provides an electronic device 100, the electronic device 100 comprising a processor 130 and a memory 120. Memory 120 stores computer-executable instructions that, when executed by processor 130, implement the linked list query code generation method.
The embodiment of the present application further provides a computer readable storage medium, where a computer program is stored, and when the computer program is executed by the processor 130, the method for generating the continuous table query code is implemented.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners as well. The apparatus embodiments described above are merely illustrative, for example, flow diagrams and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. 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). It should also be noted that 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. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part. The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is merely various embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (9)

1. A method for generating a linked list query code, the method comprising:
determining at least two groups of data sets in a database, and displaying data tables corresponding to the at least two groups of data sets in a main interface; wherein the database comprises a plurality of groups of data sets;
in the main interface, receiving the association relationship between data tables corresponding to at least two groups of data sets input by a user;
receiving a query result field corresponding to the association relation, which is input by a user, in the main interface;
generating a query code according to the association relation between the data tables corresponding to at least two groups of data sets and the query result field corresponding to the association relation; the step of receiving the association relationship between the data tables corresponding to at least two groups of data sets input by a user in the main interface comprises the following steps:
in the main interface, receiving the connection line relation between the data tables corresponding to at least two groups of data sets input by a user and the pointing relation of each connection line;
obtaining a table connection relation between the data tables corresponding to the at least two groups of data sets according to the connection relation between the data tables corresponding to the at least two groups of data sets and the pointing relation of each connection;
receiving editing operation of a user on the connection relation of each table;
determining the table connection conditions of the table connection relations according to the editing operation;
and determining the association relation between the data tables corresponding to at least two groups of data sets based on each table connection relation and the table connection condition corresponding to the table connection relation.
2. The method of claim 1, wherein the table join relationship comprises any one of: left connection of data table, right connection of data table, inner connection of data table and all outer connection of data table.
3. The method of claim 1, wherein the step of receiving, in the main interface, a query result field corresponding to the association relationship, which is input by a user, comprises:
in the main interface, receiving a first selection operation of a data table field in a data table corresponding to at least two groups of data sets establishing an association relation by a user, wherein the first selection operation comprises at least one of the following steps: the method comprises the steps of performing full selection operation, partial checking operation or reverse selection operation on table fields in a data table corresponding to at least two groups of data sets;
and determining a query result field corresponding to the association relation according to the first selection operation.
4. The method of claim 1, wherein the step of determining at least two sets of data sets in the database and displaying data tables corresponding to the at least two sets of data sets in the main interface comprises:
obtaining table resources in a database;
receiving a second selection operation of at least two groups of data sets in the table resource by a user;
determining data tables corresponding to at least two groups of data sets according to the second selection operation:
receiving touch operation of a user on data tables corresponding to at least two groups of data sets;
and according to the touch operation, moving the data tables corresponding to at least two groups of data sets to a main interface for display.
5. The method according to claim 1, wherein after the step of generating a query code according to the association between the data tables corresponding to the at least two sets of data sets and the query result field corresponding to the association, the method further comprises:
an extensible markup language configuration file of the query code and a configuration file of the structured query language are generated.
6. The method of claim 4, wherein the table resources comprise a table list for a dataset and a table structure for each data table.
7. A linked list query code generation apparatus, the apparatus comprising:
the first determining module is used for determining at least two groups of data sets in the database and displaying data tables corresponding to the at least two groups of data sets in the main interface; wherein the database comprises a plurality of groups of data sets;
the first input module is used for receiving the association relation between the data tables corresponding to at least two groups of data sets input by a user in the main interface;
the second input module is used for receiving the association relation input by the user in the main interface;
the generation module is used for generating a query code according to the association relation between the data tables corresponding to at least two groups of data sets and the query result field corresponding to the association relation;
the first input module is specifically configured to:
in the main interface, receiving the connection line relation between the data tables corresponding to at least two groups of data sets input by a user and the pointing relation of each connection line;
obtaining a table connection relation between the data tables corresponding to the at least two groups of data sets according to the connection relation between the data tables corresponding to the at least two groups of data sets and the pointing relation of each connection;
receiving editing operation of a user on the connection relation of each table;
determining the table connection conditions of the table connection relations according to the editing operation;
and determining the association relation between the data tables corresponding to at least two groups of data sets based on each table connection relation and the table connection condition corresponding to the table connection relation.
8. An electronic device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1-6 when executing the computer program.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, carries out the steps of the method according to any one of claims 1-6.
CN202110953990.0A 2021-08-19 2021-08-19 Method and device for generating continuous table query code, electronic equipment and computer readable storage medium Active CN113641698B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110953990.0A CN113641698B (en) 2021-08-19 2021-08-19 Method and device for generating continuous table query code, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110953990.0A CN113641698B (en) 2021-08-19 2021-08-19 Method and device for generating continuous table query code, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN113641698A CN113641698A (en) 2021-11-12
CN113641698B true CN113641698B (en) 2024-03-12

Family

ID=78422960

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110953990.0A Active CN113641698B (en) 2021-08-19 2021-08-19 Method and device for generating continuous table query code, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113641698B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106325833A (en) * 2015-06-18 2017-01-11 中国石油化工股份有限公司 Code generation method for enterprise information management
CN106874388A (en) * 2017-01-11 2017-06-20 中科院微电子研究所昆山分所 A kind of heterogeneous system data cascade operation method for auto constructing based on relevant database
CN107391739A (en) * 2017-08-07 2017-11-24 北京奇艺世纪科技有限公司 A kind of query statement generation method, device and electronic equipment
CN109144997A (en) * 2018-06-11 2019-01-04 玖富金科控股集团有限责任公司 Data correlation method, device and storage medium
CN110008232A (en) * 2019-04-11 2019-07-12 北京启迪区块链科技发展有限公司 Generation method, device, server and the medium of structured query sentence
CN110069532A (en) * 2019-03-14 2019-07-30 东软集团股份有限公司 Data query method, apparatus, computer readable storage medium and electronic equipment
CN111143402A (en) * 2019-12-27 2020-05-12 浪潮通用软件有限公司 Extended model generation method, device and medium
KR20200119108A (en) * 2019-04-09 2020-10-19 (주)템푸스 Method for constructing database in WYSIWYG based website builder
CN112416342A (en) * 2020-11-04 2021-02-26 杭州讯酷科技有限公司 UI (user interface) quick construction method based on associated fields

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9037546B2 (en) * 2010-03-25 2015-05-19 Salesforce.Com, Inc. System, method and computer program product for automatic code generation for database object deletion

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106325833A (en) * 2015-06-18 2017-01-11 中国石油化工股份有限公司 Code generation method for enterprise information management
CN106874388A (en) * 2017-01-11 2017-06-20 中科院微电子研究所昆山分所 A kind of heterogeneous system data cascade operation method for auto constructing based on relevant database
CN107391739A (en) * 2017-08-07 2017-11-24 北京奇艺世纪科技有限公司 A kind of query statement generation method, device and electronic equipment
CN109144997A (en) * 2018-06-11 2019-01-04 玖富金科控股集团有限责任公司 Data correlation method, device and storage medium
CN110069532A (en) * 2019-03-14 2019-07-30 东软集团股份有限公司 Data query method, apparatus, computer readable storage medium and electronic equipment
KR20200119108A (en) * 2019-04-09 2020-10-19 (주)템푸스 Method for constructing database in WYSIWYG based website builder
CN110008232A (en) * 2019-04-11 2019-07-12 北京启迪区块链科技发展有限公司 Generation method, device, server and the medium of structured query sentence
CN111143402A (en) * 2019-12-27 2020-05-12 浪潮通用软件有限公司 Extended model generation method, device and medium
CN112416342A (en) * 2020-11-04 2021-02-26 杭州讯酷科技有限公司 UI (user interface) quick construction method based on associated fields

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Mohd Arshad Bari et al..Three Dimensional Analysis of Variation between Sucessful and Unsuccessful Drag flick Techniques in Field Hockey.《International Jouranl of Research Studies in Science,Engineering and Technology》.2014,第1卷(第2期),74-78. *
基于ACCESS的图书查询管理系统设计概述;刘媛媛;;《科技风》;20110425(第08期);21 *
基于复用的动态查询构件系统的设计与实现;王瑞霞 等;《计算机应用研究》;20060110(第01期);150-152 *
郭再新.数据库完整性设计.《南京广播电视大学学报》.(第Z1期),72-76. *

Also Published As

Publication number Publication date
CN113641698A (en) 2021-11-12

Similar Documents

Publication Publication Date Title
WO2021184725A1 (en) User interface test method and apparatus, storage medium, and computer device
JP2018528559A (en) Method and system for realizing data tracking by software development kit
US10318595B2 (en) Analytics based on pipes programming model
RU2524855C2 (en) Extensibility for web-based diagram visualisation
CN108388623B (en) ER relationship generation method and device, computer equipment and storage medium
CN110689268B (en) Method and device for extracting indexes
JP2018520452A (en) Techniques for constructing generic programs using controls
KR20160083915A (en) Method, apparatus, and system for communicating and presenting product information
US20090031272A1 (en) Circuit board design tool and methods
CN110704045A (en) Method and device for constructing decision flow and storage medium
US20230385363A1 (en) Web site preview generation based on web site type
CN116594683A (en) Code annotation information generation method, device, equipment and storage medium
CN113641698B (en) Method and device for generating continuous table query code, electronic equipment and computer readable storage medium
CN104615737A (en) Search box based computing method and device
CN110968311B (en) Front-end page construction method and device and electronic equipment
CN111752560A (en) Component generation method and device, computer equipment and computer-readable storage medium
US11960817B2 (en) Web site preview based on client presentation state
US9489436B2 (en) Gateway enablement of analytic database services
CN107562461B (en) Feature calculation system, feature calculation method, storage medium, and electronic device
WO2023229693A1 (en) Web site preview generation with action control
CN111737372A (en) Map data generation method and device
CN110928667B (en) Task scheduling method and device, electronic equipment and storage medium
US11301498B2 (en) Multi-cloud object store access
CN114036313A (en) Ethnic group display method and device and electronic equipment
CN115563149A (en) Index calculation method and device, electronic 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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 610000 No. 270, floor 2, No. 8, Jinxiu street, Wuhou District, Chengdu, Sichuan

Applicant after: Chengdu shuzhilian Technology Co.,Ltd.

Address before: No.2, floor 4, building 1, Jule road crossing, Section 1, West 1st ring road, Wuhou District, Chengdu City, Sichuan Province 610041

Applicant before: CHENGDU SHUZHILIAN TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant