CN110825766A - Query condition generation method and device, server and readable storage medium - Google Patents

Query condition generation method and device, server and readable storage medium Download PDF

Info

Publication number
CN110825766A
CN110825766A CN201911107210.XA CN201911107210A CN110825766A CN 110825766 A CN110825766 A CN 110825766A CN 201911107210 A CN201911107210 A CN 201911107210A CN 110825766 A CN110825766 A CN 110825766A
Authority
CN
China
Prior art keywords
query
component
target data
user
data query
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
CN201911107210.XA
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.)
Enyike (beijing) Data Technology Co Ltd
Original Assignee
Enyike (beijing) Data 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 Enyike (beijing) Data Technology Co Ltd filed Critical Enyike (beijing) Data Technology Co Ltd
Priority to CN201911107210.XA priority Critical patent/CN110825766A/en
Publication of CN110825766A publication Critical patent/CN110825766A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2428Query predicate definition using graphical user interfaces, including menus and forms
    • 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)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application provides a query condition generation method, a query condition generation device, a server and a readable storage medium, and relates to the technical field of computers. The query condition generating method provides a data query component for configuring query conditions of a database, and firstly, the data query component responds to a target data query component selected by a user on a query condition editing interface. And then, responding to the configuration operation of the user on the parameter content of the target data query component, and determining the parameter content. And finally, generating a corresponding database query statement according to the parameter content to acquire corresponding target data. Therefore, the research and development process is simplified, and the research and development period is shortened.

Description

Query condition generation method and device, server and readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a query condition generation method, an apparatus, a server, and a readable storage medium.
Background
In database applications, a database is connected with a data query page, and displaying data in the database on the data query page is a common means in database applications. For a data management system, the management of data includes storage, processing, presentation, and interaction. Wherein, the storage and processing of data are the basis, and the reasonable presentation and interaction of data are also very important for the user experience. In the research and development work of a computer system, the situations of complex underlying data, numerous dimensions and high degree of freedom often occur, and the situations of complex logic, large workload and frequent modification occur in the development of a corresponding front-end user operation page.
If a new query function needs to be developed, because the coupling between codes is strong, research and development personnel need to research and develop again according to the bottom-layer logic, the time spent is long, much effort needs to be paid, and the service response speed is slow. How to simplify the research and development process, shorten the research and development cycle, and improve the research and development efficiency is a problem which needs to be solved urgently at present.
Disclosure of Invention
In view of the above, the present application provides a query condition generating method, device, server and readable storage medium to solve the above problems.
In order to achieve the above purpose, the embodiments of the present application employ the following technical solutions:
in a first aspect, an embodiment provides a query condition generating method, where the method includes:
providing a query condition editing interface, and displaying at least one data query component on the query condition editing interface, wherein the data query component is used for configuring a database query condition;
responding to the selection operation of the user on the query condition editing interface, and taking at least one data query component selected by the user as a target data query component;
responding to the configuration operation of a user on the parameter content of each target data query component on the query condition editing interface, and determining the parameter content of each target data query component;
and generating a corresponding database query statement according to the parameter content, and acquiring corresponding target data through the database query statement.
In an optional embodiment, the query condition editing interface includes an editing canvas area, the editing canvas area is used for displaying the target data query component, and after the step of taking at least one data query component selected by a user as a target data query component in response to a selection operation of the user on the query condition editing interface, the method further includes:
and responding to the dragging operation of the user on the target data query component, and displaying the target data query component at the corresponding position of the editing and layout area.
In an alternative embodiment, the parameter content includes a target data source and a data filtering condition, the target data query component includes a data source component and a query condition component, and the step of responding to the configuration operation of the user on the query condition editing interface on the parameter content of each target data query component includes:
responding to the configuration operation of a user on the data source component, and obtaining a target data source;
and responding to the configuration operation of the user on the query condition component to obtain the data screening condition of the target data source.
In an optional embodiment, the query condition editing interface further includes a query statement generation component, and the step of determining the parameter content of each target data query component includes:
and determining the parameter content of each target data query component according to a preset communication mode among the data query components based on the query statement generation components.
In an optional embodiment, the step of generating a corresponding database query statement according to the parameter content includes:
and generating the database query statement according to the parameter content according to the grammar rule of the query statement of the database based on the query statement generating component.
In an alternative embodiment, the method further comprises:
and generating a data query webpage according to the target data query component and the parameter content of the target data query component and issuing the data query webpage.
In an alternative embodiment, the data query component is developed based on the React front end framework.
In a second aspect, an embodiment provides a query condition generating apparatus, including:
the system comprises a providing module, a database query module and a query module, wherein the providing module is used for providing a query condition editing interface, and displaying at least one data query component on the query condition editing interface, and the data query component is used for configuring query conditions of the database;
the selection operation response module is used for responding to the selection operation of the user on the query condition editing interface and taking at least one data query component selected by the user as a target data query component;
the configuration operation response module is used for responding to the configuration operation of a user on the parameter content of each target data query component on the query condition editing interface and determining the parameter content of each target data query component;
and the generating module is used for generating corresponding database query statements according to the parameter contents and acquiring corresponding target data through the database query statements.
In a third aspect, an embodiment provides a server, where the server includes a processor, a memory and a bus, where the memory stores machine-readable instructions executable by the processor, and when the server runs, the processor and the memory communicate with each other through the bus, and the processor executes the machine-readable instructions to perform the steps of the query condition generating method in any one of the foregoing embodiments.
In a fourth aspect, an embodiment provides a readable storage medium, in which a computer program is stored, and the computer program, when executed, implements the query condition generating method described in any one of the foregoing embodiments.
The embodiment of the application provides a query condition generation method, a query condition generation device, a server and a readable storage medium. The query condition generating method provides a data query component for configuring query conditions of a database, and firstly, the data query component responds to a target data query component selected by a user on a query condition editing interface. And then, responding to the configuration operation of the user on the parameter content of the target data query component, and determining the parameter content. And finally, generating a corresponding database query statement according to the parameter content to acquire corresponding target data. Therefore, the research and development process is simplified, the research and development period is shortened, and the research and development efficiency is improved.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a query condition generating method according to an embodiment of the present application;
fig. 3 is another flowchart of a query condition generating method according to an embodiment of the present application;
FIG. 4 is an operation page of a query condition generator according to an embodiment of the present disclosure;
FIG. 5 is another operation page of a query condition generator provided in an embodiment of the present application;
fig. 6 is a functional block diagram of a query condition generating apparatus according to an embodiment of the present application.
Icon: 100-an electronic device; 110-a memory; 120-a processor; 130-query condition generating means; 131-providing a module; 132-select operation response module; 133-configure operation response module; 134-a generation module; 200-a query condition generator; 201-logical decision group; 202-add rule button; 203-add group button; 204-remove button; 205-query data component.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It is noted that relational terms such as "first" and "second," and the like, may be 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. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
As described in the background section, the currently used query condition generator has a high degree of coupling between codes, and when a new query function needs to be added, for example, to query "a brand name including two characters in shanghai", a developer needs to re-develop and re-develop a "brand" component, "an" including "component, and a" query content "component according to underlying logic, which takes a long time, needs to pay much effort, and has a slow business response speed. How to simplify the research and development process and improve the research and development efficiency is a problem which needs to be solved urgently at present.
In view of this, an embodiment of the present application provides a query condition generating method, which is applied to an electronic device. The method directly provides the data query component which can be selected and reused, developers can drag the required data query component and modify the parameters of the data query component to realize the corresponding query function, so that the research and development process is simplified, and the research and development efficiency is improved. The above-mentioned contents will be described in detail below.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present disclosure. The query condition generating method provided by the embodiment of the present invention is applied to the electronic device 100 shown in fig. 1, and the electronic device 100 executes the query condition generating method provided by the embodiment.
It is to be noted that the electronic device may be a local electronic device (e.g., a personal computer, a mobile terminal, etc.) or a server as long as the condition generating method can be executed. The embodiments of the present application are not limited to a few.
The electronic device 100 may include a processor 120, a memory 110, a query condition generating device 130, and a bus, where the memory 110 stores machine-readable instructions executable by the processor 120, and when the electronic device 100 runs, the processor 120 and the memory 110 communicate with each other through the bus, and the processor 120 executes the machine-readable instructions and executes the steps of the query condition generating method.
The memory 110, the processor 120, and other components are electrically connected to each other directly or indirectly to enable signal transmission or interaction.
For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The query condition generating means 130 includes at least one software function module which can be stored in the memory 110 in the form of software or firmware (firmware). The processor 120 is configured to execute an executable module stored in the memory 110, such as a software functional module or a computer program included in the query condition generating apparatus 130.
The Memory 110 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The processor 120 may be an integrated circuit chip having signal processing capabilities. The processor 120 may be a general-purpose processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and so on.
But may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The various methods, steps, and logic blocks disclosed 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 or the like.
In this embodiment, the memory 110 is used for storing programs, and the processor 120 is used for executing the programs after receiving the execution instructions. The method defined by the process disclosed in any of the embodiments of the present application can be applied to the processor 120, or implemented by the processor 120.
It will be appreciated that the configuration shown in figure 1 is merely illustrative. Electronic device 100 may also have more or fewer components than shown in FIG. 1, or a different configuration than shown in FIG. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
Based on the architecture diagram of the electronic device 100, please refer to fig. 2, fig. 2 is a flowchart of a query condition generating method according to an embodiment of the present application, which is executed by the electronic device shown in fig. 1, and the flowchart shown in fig. 2 is described in detail below.
And S1, providing a query condition editing interface, and displaying at least one data query component on the query condition editing interface, wherein the data query component is used for configuring database query conditions.
Alternatively, taking a personal computer as an example, the user accesses the server through a browser of the personal computer to obtain the query condition editing interface. The query condition editing interface is used for editing the data query component.
The data query component is developed and obtained based on the React front-end framework. React is a declarative, efficient and flexible framework for constructing a user interface. The core idea is as follows: a package assembly. Each component maintains its own state and User Interface (UI), and when the state changes, the entire component is automatically re-rendered. As such, there is no need for a user to tediously find Document Object Model (DOM) elements back and forth and then manipulate the DOM to alter the UI.
It should be noted that the data query component is not limited to be developed by the read front-end framework, but may be other front-end frameworks such as vue.
Because the coupling between each data query component is low and the independence is high, the data query components can be reused for multiple times when different query condition requirements are met, related codes do not need to be re-developed, and the subsequent development process is simplified.
And S2, responding to the selection operation of the user on the query condition editing interface, and taking at least one data query component selected by the user as a target data query component.
The query condition editing interface comprises an editing canvas area, the editing canvas area is used for displaying the target data query components, the query condition editing interface further comprises a non-editing canvas area, and at least one data query component is distributed and arranged in the non-editing canvas area. The data query components displayed in the non-edit layout region may be text, graphics, or any combination thereof.
When a user selects one of the data query components in the non-edit canvas area through an external input device (e.g., a mouse), the state of the selected data query component (target data query component) assumes a state different from that of the non-selected data query component. For example, the color of the selected data query component is red, and the color of the unselected data query component is white, so as to respond to the selection operation of the user. It is understood that the color may be any different color, as long as the selected and unselected data query components can be distinguished, and is not limited herein.
Further, after responding to the selection operation of the user, the query condition generating method further includes: and responding to the dragging operation of the user on the target data query component, and displaying the target data query component at the corresponding position of the editing and layout area. The user may drag the target data query component to any location in the edit canvas area.
As another embodiment, each data query component is provided with a corresponding add button. And responding to the clicking operation for the adding button, and displaying the target data query component selected by the user in the editing canvas area. Further, the user may adjust the location of each target data query component within the edit canvas area.
And S3, responding to the configuration operation of the user on the parameter content of each target data query component on the query condition editing interface, and determining the parameter content of each target data query component.
The parameter content comprises a target data source and a data screening condition, and the target data query component comprises a data source component and a query condition component.
The data source component is used for providing a plurality of target sources to be screened so that a user can select the target data sources according to needs. For example, the target sources to be screened may include clothing data, commodity sales data, food data, student performance data, and the like.
In one possible example, the query condition component can be a logic component, a judgment component, a date component, a brand component, a condition component, a units component, and a numerical component. It should be understood that the above query condition component is only one possible example provided by the present application, and that other query condition components may also be included. The user can make corresponding adjustment according to the specific service scene.
The screening conditions in the logic component are used to configure relationships between the screening conditions. The logic component may include: and Or & (multiple conditions hold at the same time), Or | (any of the multiple conditions hold), Not, Or |)! (not established).
The determining of the screening conditions in the component may include: > (greater than), < (less than), ≧ equal to or greater than, ltoreq (less than equal), < equal to (equal) and! Is not equal to.
The display mode of the screening condition may be a form of a character, a figure, a symbol, or any combination thereof.
The screening conditions in the date component may include all years, months, and days in the era. For example: 3/7/2019, 8/11/2025, and 30/1/2025. The screening conditions in the date component may also be any date in the chronological act, such as: 1/1900 year-12/2050/31/day.
In one possible example, the date component provides an operation interface in the form of a table for acquiring a corresponding filtering date in response to a date selection operation of a user in the table.
In another possible example, the date component provides a text input box with a preset input format, and is used for responding to date input operation of a user in the text input box and acquiring the corresponding screening date.
It should be understood that the date component is not limited to the above operation manner, and may be other operation interfaces as long as the filtering date input by the user can be obtained. The embodiments of the present application are not limited to a few.
The brand component provides a plurality of brand identifiers to be selected by the user for convenient selection by the user. For example, the brand identifier may include a food brand identifier, a clothing brand identifier, an electronic device brand identifier, and the like.
The condition component is used for providing screening attributes aiming at the data source to be screened. For the condition component, in a possible example, taking a clothing data source as an example, the screening condition corresponding to the clothing data source may include: price, size, quantity, color, date of manufacture, etc.
In another possible example, taking a food data source as an example, the screening conditions of the food data source may include price, expiration date, weight, and the like.
The screening conditions in the unit cell may include: monetary units, e.g., units, angles, minutes; units of length, e.g. kilometers, meters, centimeters.
The numerical value component is used for screening numerical values corresponding to the screening attributes of the data source to be screened. Taking price as an example, the value component is used to facilitate the user in defining the price range of the data to be filtered.
Referring to fig. 3 in combination, fig. 3 is a flowchart illustrating sub-steps of a query condition generating method according to an embodiment of the present application, where the following steps S31-S33 are performed to implement a configuration operation of parameter contents of each target data query component on the query condition editing interface in response to a user, and determine the parameter contents of each target data query component.
And S31, responding to the configuration operation of the data source component by the user, and obtaining the target data source.
The data source may be various categories of business data stored in database software. Such as commodity sales data, order statistics, etc. The database may be database software configured locally at the electronic device or the data processing device.
And S32, responding to the configuration operation of the user to the query condition component, and obtaining the data screening condition of the target data source.
Further, the query condition editing interface also comprises a query statement generation component.
And S33, based on the query statement generation components, determining the parameter content of each target data query component according to the preset communication mode among the data query components.
As an embodiment, the detailed description will be given by taking the example of querying the commodity information with the price less than 100 yuan in the commodity sales data and combining the above method steps.
The user can select a data source component, a condition component, a judgment component, a numerical value component and a unit component as target data query components according to the query conditions, drag the target data query components to any area of the editing and layout area respectively, and determine the position of each target data query component. And configuring the parameter content of each target data query component.
Firstly, configuring a data source component, and selecting a target data source as commodity sales data; and carrying out configuration operation on the condition components, and selecting the screening condition with the content of price. And configuring the judgment component, selecting the screening condition with the content of less than, configuring the numerical component, and selecting the screening content with the content of 100. The unit components are configured, and a screening condition with the content of element is selected.
And then, selecting and dragging a query statement generation component in the query condition editing interface, and determining the parameter content of each target data query component according to the communication mode of the components in the React front-end framework on the basis of the query statement generation component. The communication mode of the components in the fact front-end framework can refer to the prior art, and is not described herein in detail.
For example, based on a target data query component developed by the fact front-end framework, parameter content configured by a user is converted into a data message in a JSON (JavaScript Object Notation) format, and the data message is transmitted to a query statement generation component, so that the query statement generation component analyzes the data message in the JSON format, obtains a screening condition therein, and then generates a corresponding database query statement.
It should be noted that the database query statement may be an SQL query statement, or may be a query statement corresponding to another database. The examples of this application are not intended to be limiting.
In another embodiment, the target data source selected by the user is obtained in response to the configuration operation of the data source component by the user. And providing a corresponding query condition component based on the corresponding field of the target data source. And then enabling the user to correspondingly configure the query condition component.
The following description will be given with reference to this embodiment, taking an example of inquiring about data examination results of a samming student.
First, the user drags out the data source component, configures the data source component, and determines the target data source to be student performance data. The corresponding fields under the target data source comprise the names of students, subjects, scores and the like. The server provides and displays query condition components in the non-editing canvas area based on fields corresponding to the student achievement data source, wherein the query condition components comprise a student name component, a subject component, an achievement component, a logic component, a judgment component, a numerical value component and the like, and other irrelevant components are not displayed.
Then, the user selects a student name component and a subject component and drags the student name component and the subject component to an editing and layout area, the student name component is configured, and a screening condition with the content of 'Xiaoming' is selected; the subject component is configured to select a screening condition whose content is "math".
And finally, selecting and dragging a query statement generation component in the query condition editing interface, and determining the parameter content of each target data query component according to the communication mode of the components in the React front-end framework on the basis of the query statement generation component.
And S4, generating a corresponding database query statement according to the parameter content, and acquiring corresponding target data through the database query statement.
Optionally, first, based on the query statement generation component, the database query statement is generated according to the parameter content according to the syntax rule of the query statement of the database.
And then, acquiring target data in the corresponding target data source by using the generated database query statement. For example, the query condition is "commodity information with a query price less than 100 yuan", and the database query statement generated according to the syntax rule of the database query statement is: "select from prices person price < 100" using the database query statement can obtain the commodity information with price less than 100 in the commodity sales data.
In the embodiment of the application, the data query component which can be selected and reused is directly provided, so that a user can drag the target data query component and modify the parameters of the target data query component to realize the corresponding query function. On one hand, the research and development process is simplified, the research and development efficiency is improved, and on the other hand, the error rate is reduced by developing the data query component developed in advance.
Further, as an implementation manner, in the embodiment of the present application, a data query webpage may be generated according to the target data query component and the parameter content of the target data query component, and the data query webpage is issued.
Optionally, based on the query condition editing interface, generating a corresponding data query webpage according to a target data query component selected by a user from the data query components, and publishing the data query webpage. And meanwhile, the data query webpage is deployed to a server, so that a user can conveniently and directly access the data query webpage, and a target data source is screened through a target data query component provided in the data query webpage. Therefore, the user can reuse the target data query component, and the working efficiency is improved.
As an implementation mode, query conditions can be created in batch, so that a user can directly perform data query through an input box or an option of a fixed mode in a data query webpage, and the obtained target data content can be displayed in the webpage or output on a printer.
As another implementation mode, the query condition generator can be used for generating the query condition for the user to select the query condition by batch creation. Referring to fig. 4, fig. 4 is an operation page of a query condition generator 200 according to an embodiment of the present application.
The operation page of the query condition generator 200 includes: logical decision group 201, add rules button 202, add group button 203, remove button 204, and query data component 205.
The logic judgment groups 201 include two logic relations of "and" or ", each logic judgment group includes at least one query rule, and the logic judgment groups 201 are used for judging the relation between the query rules.
The add rule button 202 is used to add a new query rule according to the user's selection.
The add group button 203 is used to add a new logical decision group according to the user's selection.
The remove button 204 is used to delete an existing logical judgment group or delete an existing query rule according to the user's selection.
Similarly, for example, when the query generation component is used to query the commodity information with a price less than 100 yuan in the commodity sales data, the commodity sales data in the data source is first selected as the target data source, and then the respective query data components 205 select the filter contents such as "price", "less than", "100", and the like. In this manner, a corresponding query statement may be obtained.
Referring to fig. 5, fig. 5 is another operation page of a query condition generator 200 according to an embodiment of the present application. When more complex query requirements need to be realized, for example, commodity information with the price less than 100 before 12 and 31 months in 2019 in commodity sales data is queried.
The user may add another set of query rules via the add rules button 202. And the selection logic determines that the logic of group 201 is "and". Selecting commodity sales data in the data source as a target data source, and then setting the screening conditions in each query data component 205 in the first set of query rules as "price", "less than" and "100" respectively; the filtering conditions in each query data component 205 in the second set of query rules are set to "date", "less than", "20191231", respectively. In this way, the data query statement corresponding to the commodity information with the price less than 100 in 12/31/2019 in the commodity sales data can be obtained as the query requirement. And obtaining corresponding query content according to the data query statement.
More query functions can be implemented by the query condition generator 200, which is not described herein.
On the basis of the above, please refer to fig. 6 in combination, and fig. 6 is a functional block diagram of the query condition generating device 130 according to the embodiment of the present application. The present embodiment further provides a query condition generating device 130, where the query condition generating device 130 includes:
the providing module 131 is configured to provide a query condition editing interface, and display at least one data query component on the query condition editing interface, where the data query component is used to configure a database query condition.
And the selecting operation responding module 132 is configured to respond to a selecting operation of the user on the query condition editing interface, and use at least one data query component selected by the user as a target data query component.
The configuration operation responding module 133 is configured to determine the parameter content of each target data query component in response to a configuration operation performed by a user on the parameter content of each target data query component on the query condition editing interface.
The generating module 134 is configured to generate a corresponding database query statement according to the parameter content, and obtain corresponding target data through the database query statement.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the query condition generating apparatus described above may refer to the corresponding process in the foregoing method, and will not be described in too much detail herein.
On the basis of the above, the present embodiment also provides a readable storage medium, which includes a computer program, and the computer program is executed to implement the query condition generating method described above.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the readable storage medium described above may refer to the corresponding process in the foregoing method, and will not be described in detail herein.
In summary, the present application provides a query condition generating method, a query condition generating device, an electronic device 100, and a readable storage medium. The query condition generating method provides a data query component for configuring query conditions of a database, and firstly, the data query component responds to a target data query component selected by a user on a query condition editing interface. And then, responding to the configuration operation of the user on the parameter content of the target data query component, and determining the parameter content. And finally, generating a corresponding database query statement according to the parameter content to acquire corresponding target data. Therefore, the research and development process is simplified, the research and development period is shortened, and the research and development efficiency is improved.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A query condition generating method, the method comprising:
providing a query condition editing interface, and displaying at least one data query component on the query condition editing interface, wherein the data query component is used for configuring a database query condition;
responding to the selection operation of the user on the query condition editing interface, and taking at least one data query component selected by the user as a target data query component;
responding to the configuration operation of a user on the parameter content of each target data query component on the query condition editing interface, and determining the parameter content of each target data query component;
and generating a corresponding database query statement according to the parameter content, and acquiring corresponding target data through the database query statement.
2. The method according to claim 1, wherein the query condition editing interface includes an editing layout area, the editing layout area is used for displaying the target data query components, and after the step of taking at least one data query component selected by a user as a target data query component in response to a selection operation of the user on the query condition editing interface, the method further includes:
and responding to the dragging operation of the user on the target data query component, and displaying the target data query component at the corresponding position of the editing and layout area.
3. The method of claim 1, wherein the parameter content includes a target data source and a data filter, the target data query component includes a data source component and a query condition component, and the step of responding to the user's configuration operation on the parameter content of each target data query component on the query condition editing interface includes:
responding to the configuration operation of a user on the data source component, and obtaining a target data source;
and responding to the configuration operation of the user on the query condition component to obtain the data screening condition of the target data source.
4. The method of claim 1, wherein the query condition editing interface further comprises query statement generation components, and the step of determining the parameter content of each target data query component comprises:
and determining the parameter content of each target data query component according to a preset communication mode among the data query components based on the query statement generation components.
5. The method according to claim 4, wherein the step of generating the corresponding database query statement according to the parameter content comprises:
and generating the database query statement according to the parameter content based on the query statement generation component and according to the grammar rule of the query statement of the database.
6. The query condition generation method according to claim 1, further comprising:
and generating a data query webpage according to the target data query component and the parameter content of the target data query component and issuing the data query webpage.
7. The query condition generation method according to claim 1, wherein the data query component is developed based on a React front-end framework.
8. A query condition generating apparatus, comprising:
the system comprises a providing module, a database query module and a query module, wherein the providing module is used for providing a query condition editing interface, and displaying at least one data query component on the query condition editing interface, and the data query component is used for configuring query conditions of the database;
the selection operation response module is used for responding to the selection operation of the user on the query condition editing interface and taking at least one data query component selected by the user as a target data query component;
the configuration operation response module is used for responding to the configuration operation of a user on the parameter content of each target data query component on the query condition editing interface and determining the parameter content of each target data query component;
and the generating module is used for generating corresponding database query statements according to the parameter contents and acquiring corresponding target data through the database query statements.
9. A server, comprising a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, when the server runs, the processor and the memory communicate with each other via the bus, and the processor executes the machine-readable instructions to perform the steps of the query condition generating method according to any one of claims 1 to 7.
10. A readable storage medium, wherein a computer program is stored in the readable storage medium, and when executed, the computer program implements the query condition generating method according to any one of claims 1 to 7.
CN201911107210.XA 2019-11-13 2019-11-13 Query condition generation method and device, server and readable storage medium Pending CN110825766A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911107210.XA CN110825766A (en) 2019-11-13 2019-11-13 Query condition generation method and device, server and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911107210.XA CN110825766A (en) 2019-11-13 2019-11-13 Query condition generation method and device, server and readable storage medium

Publications (1)

Publication Number Publication Date
CN110825766A true CN110825766A (en) 2020-02-21

Family

ID=69554547

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911107210.XA Pending CN110825766A (en) 2019-11-13 2019-11-13 Query condition generation method and device, server and readable storage medium

Country Status (1)

Country Link
CN (1) CN110825766A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111339125A (en) * 2020-02-24 2020-06-26 山东浪潮商用系统有限公司 Data query method and device
CN111522840A (en) * 2020-04-27 2020-08-11 平安科技(深圳)有限公司 Label configuration method, device, equipment and computer readable storage medium
CN112148771A (en) * 2020-09-22 2020-12-29 京东数字科技控股股份有限公司 Data association query method and device, electronic equipment and storage medium
CN112464034A (en) * 2020-12-08 2021-03-09 深圳市欢太科技有限公司 User data extraction method and device, electronic equipment and computer readable medium
CN112685445A (en) * 2020-12-29 2021-04-20 杭州旷云金智科技有限公司 Data query method and device, storage medium and electronic equipment
CN112685435A (en) * 2020-12-21 2021-04-20 福建新大陆软件工程有限公司 Table query method and system based on Vue and Mybatis
CN113204680A (en) * 2021-04-30 2021-08-03 中核武汉核电运行技术股份有限公司 Nuclear power plant personnel positioning method, device, equipment and storage medium
CN113220948A (en) * 2021-04-30 2021-08-06 中核武汉核电运行技术股份有限公司 Nuclear power plant equipment selection method, device, equipment and storage medium
CN113222535A (en) * 2021-04-30 2021-08-06 中核武汉核电运行技术股份有限公司 Organization mechanism selection method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040068489A1 (en) * 2002-10-03 2004-04-08 International Business Machines Corporation SQL query construction using durable query components
CN105659199A (en) * 2013-09-30 2016-06-08 微软技术许可有限责任公司 Extendable blade sequence along pannable canvas direction
CN106909610A (en) * 2017-01-10 2017-06-30 中电科华云信息技术有限公司 Visualization based on browser pulls the method and system of inquiry data
CN109213780A (en) * 2018-08-24 2019-01-15 周宁 A kind of inquiry name and multiplexing support system and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040068489A1 (en) * 2002-10-03 2004-04-08 International Business Machines Corporation SQL query construction using durable query components
CN105659199A (en) * 2013-09-30 2016-06-08 微软技术许可有限责任公司 Extendable blade sequence along pannable canvas direction
CN106909610A (en) * 2017-01-10 2017-06-30 中电科华云信息技术有限公司 Visualization based on browser pulls the method and system of inquiry data
CN109213780A (en) * 2018-08-24 2019-01-15 周宁 A kind of inquiry name and multiplexing support system and method

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111339125A (en) * 2020-02-24 2020-06-26 山东浪潮商用系统有限公司 Data query method and device
CN111339125B (en) * 2020-02-24 2023-07-25 浪潮软件科技有限公司 Data query method and device
CN111522840A (en) * 2020-04-27 2020-08-11 平安科技(深圳)有限公司 Label configuration method, device, equipment and computer readable storage medium
CN111522840B (en) * 2020-04-27 2023-08-11 平安科技(深圳)有限公司 Label configuration method, device, equipment and computer readable storage medium
CN112148771A (en) * 2020-09-22 2020-12-29 京东数字科技控股股份有限公司 Data association query method and device, electronic equipment and storage medium
CN112464034A (en) * 2020-12-08 2021-03-09 深圳市欢太科技有限公司 User data extraction method and device, electronic equipment and computer readable medium
CN112685435A (en) * 2020-12-21 2021-04-20 福建新大陆软件工程有限公司 Table query method and system based on Vue and Mybatis
CN112685445A (en) * 2020-12-29 2021-04-20 杭州旷云金智科技有限公司 Data query method and device, storage medium and electronic equipment
CN113204680A (en) * 2021-04-30 2021-08-03 中核武汉核电运行技术股份有限公司 Nuclear power plant personnel positioning method, device, equipment and storage medium
CN113220948A (en) * 2021-04-30 2021-08-06 中核武汉核电运行技术股份有限公司 Nuclear power plant equipment selection method, device, equipment and storage medium
CN113222535A (en) * 2021-04-30 2021-08-06 中核武汉核电运行技术股份有限公司 Organization mechanism selection method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110825766A (en) Query condition generation method and device, server and readable storage medium
CN113094037B (en) Interaction method, development platform, equipment and storage medium for forms and workflows
CN111125560B (en) Data visualization processing method, device and computer system
US8839133B2 (en) Data visualizations including interactive time line representations
CN107102848B (en) Specifying user interface elements
US7913225B2 (en) Error handling using declarative constraints in a graphical modeling tool
US8239226B2 (en) Methods and apparatus for combining properties and methods from a plurality of different data sources
KR20150042292A (en) Visualizing relationships between data elements and graphical representations of data element attributes
CN112368685A (en) Customizable enterprise automation test framework
US9754000B2 (en) Integration scenario for master data with software-as-a-service system
US20070136675A1 (en) Methods and apparatus for updating a plurality of data fields in an elecronic form
CN112764736B (en) Web end flow chart modeling method, device and system
CN111444696A (en) Report display and editing method and device
CN114036443A (en) Page generation method and device
CN114048329A (en) Knowledge graph construction and display method and device, electronic equipment and medium
CN113704288A (en) Data display method and device, computer readable medium and electronic equipment
CN115455135A (en) Visual automatic modeling method and device, electronic equipment and storage medium
US20070136358A1 (en) Methods and apparatus for storing data associated with an electronic form
CN110941634A (en) Data processing method and device, storage medium and electronic device
CN114416067A (en) Visual building system and method
WO2007056656A2 (en) Methods and apparatus for processing business objects, electronic forms, and workflows
US20070143305A1 (en) Methods and apparatus for storing functions associated with an electronic form
CN110780970A (en) Data screening method, device, equipment and computer readable storage medium
US10817811B2 (en) Methods and apparatus for exposing workflow process definitions as business objects
CN114995728A (en) Rule configuration 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200221

RJ01 Rejection of invention patent application after publication