CN117742671A - Dynamic generation method and system based on low-code design component and electronic equipment - Google Patents

Dynamic generation method and system based on low-code design component and electronic equipment Download PDF

Info

Publication number
CN117742671A
CN117742671A CN202311780911.6A CN202311780911A CN117742671A CN 117742671 A CN117742671 A CN 117742671A CN 202311780911 A CN202311780911 A CN 202311780911A CN 117742671 A CN117742671 A CN 117742671A
Authority
CN
China
Prior art keywords
database table
field
component
design component
database
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
CN202311780911.6A
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.)
Chengdu Zhongke Jiyun Software Co ltd
Original Assignee
Chengdu Zhongke Jiyun Software 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 Zhongke Jiyun Software Co ltd filed Critical Chengdu Zhongke Jiyun Software Co ltd
Priority to CN202311780911.6A priority Critical patent/CN117742671A/en
Publication of CN117742671A publication Critical patent/CN117742671A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure belongs to the technical field of low-code development, and particularly provides a dynamic generation method, a system and electronic equipment based on a low-code design component, wherein the method comprises the steps of configuring database connection information; dragging the design component and saving the page; binding the field names of the database tables of the pages to design component ids; dynamically analyzing the type of the database table field according to the type of the component; and (3) automatically generating a corresponding 'ALTER TABLE' SQL sentence by combining the database TABLE field name in the step (S3) and the database TABLE field type in the step (S4). And executing the SQL statement generated in the step S5 according to the configured database connection information, and dynamically generating and updating the database table. This scheme improves development efficiency: by automatically generating SQL statements and generating and updating database tables, the time and effort of a developer to write code is reduced. The possibility of errors is also reduced: because all operations are automatically performed, human errors are avoided.

Description

Dynamic generation method and system based on low-code design component and electronic equipment
Technical Field
The disclosure relates to the technical field of low-code development, in particular to a dynamic generation method, a dynamic generation system and electronic equipment based on a low-code design component.
Background
In existing software development, developers are typically required to perform database design and write a large amount of code to define and implement the functions of the software. This approach not only has a high development threshold, but also requires significant time and labor costs. Furthermore, when the requirements of the software change, a large amount of code needs to be modified and updated, which undoubtedly increases the complexity and risk of development.
In order to solve the above-described problems, low code development techniques have been proposed. The low-code development technology enables developers to quickly construct application programs by means of dragging components, configuring parameters and the like by providing a visual interface. However, existing low code development techniques still have some problems. For example, for database table generation and updating, a developer is typically required to manually write SQL statements, which not only increases development effort, but is also prone to error.
Disclosure of Invention
The disclosure aims to at least solve one of the technical problems in the prior art, and provides a dynamic generation method, a system and electronic equipment based on a low-code design component.
In a first aspect, the present disclosure provides a low code design component based dynamic generation method, comprising the steps of:
s1, configuring database connection information;
s2, dragging the design component and saving the page;
s3, binding the field names of the database tables of the pages to design component ids;
s4, dynamically analyzing the type of the database table field according to the type of the component;
s5, automatically generating a corresponding ALTER TABLE SQL sentence by combining the database TABLE field name in the step S3 and the database TABLE field type in the step S4;
and S6, executing the SQL statement generated in the step S5 according to the configured database connection information, and dynamically generating and updating the database table.
Preferably, the S2 specifically includes:
and dragging and selecting the design component through a visualized low-code configuration interface, configuring parameters on the design component, and storing the page.
Preferably, the step S2 further includes:
judging whether a database table exists on the page or not; if the generated database table does not exist in the page, creating a database table which comprises a default field as an auto-increment main key and has a table name of a random character string; if the page has a generated database table, it proceeds directly to the next step S3.
Preferably, the step S3 specifically includes:
and dynamically generating field information according to the input design component, and taking the component id as a database table field name, so that the dynamically generated database table field is bound with the design component.
Preferably, the S4 specifically includes:
when the component type is a common character component of an input box or a text box, automatically analyzing the database table field into a longtext type;
when the component type is a common numerical value type component of a numerical value frame and an amount, the database table field is automatically analyzed into a double type, and the field length and the decimal number are set according to the component configuration.
Preferably, the step S5 specifically includes:
and (3) comparing the field information generated in the last step S4 with the field information of the existing TABLE, distinguishing the field list needing to be added, updated or deleted, and automatically generating a corresponding ALTER TABLE SQL sentence by combining the database TABLE field name in the step S3 and the database TABLE field type in the step S4.
The invention also provides a dynamic generation system based on the low-code design component, which can be used for realizing the dynamic generation method based on the low-code design component, and comprises the following steps:
the configuration module is configured to configure database connection information;
the dragging module is configured to drag the design component and store the page;
the binding module is configured to bind the field names of the database tables of the pages to the id of the design component;
the dynamic analysis module is configured to dynamically analyze the type of the database table field according to the type of the component;
the SQL sentence generating module is configured to generate a corresponding ALTER TABLE SQL sentence;
and the database table updating module is configured to execute SQL sentences according to the configured database connection information and dynamically generate and update the database table.
The invention also provides an electronic device, comprising:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement a low-code design component based dynamic generation method.
Compared with the related art, the method has the following beneficial effects:
1. development efficiency is improved: by automatically generating SQL statements and generating and updating database tables, the time and effort of a developer to write code is reduced.
2. The possibility of errors is reduced: because all operations are automatically performed, human errors are avoided.
3. Flexibility of development is improved: the developer can quickly construct the application program by dragging the component and configuring parameters, and does not need to care about the implementation details of the bottom layer.
4. The maintainability of development is improved: when the software requirement changes, only the components need to be adjusted on the visual interface, and a large amount of codes do not need to be modified and updated.
Drawings
FIG. 1 is a flow chart of a dynamic generation method based on a low code design component provided by an embodiment of the present disclosure;
fig. 2 is a block diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
In order that those skilled in the art will better understand the technical solutions of the present disclosure, the present disclosure will be described in further detail with reference to the accompanying drawings and detailed description.
Unless defined otherwise, technical or scientific terms used in this disclosure should be given the ordinary meaning as understood by one of ordinary skill in the art to which this disclosure belongs. The terms "first," "second," and the like, as used in this disclosure, are not intended to be inclusive of any order, quantity, or importance, but rather are used to distinguish between different components. Also, the terms "a," "an," or "the" and similar terms are not intended to be limiting in number, but rather are intended to mean that there is at least one. The word "comprising" or "comprises", and the like, means that elements or items preceding the word are included in the element or item listed after the word and equivalents thereof, but does not exclude other elements or items. The terms "connected" or "connected," and the like, are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", etc. are used only for the relative positional relationship, and when the absolute position of the object to be described is changed, the relative positional relationship may be changed accordingly.
Like elements are designated with like reference numerals throughout the various figures. For purposes of clarity, the various features of the drawings are not drawn to scale. Furthermore, some well-known portions may not be shown in the drawings.
Numerous specific details of the present disclosure, such as construction, materials, dimensions, processing techniques and technologies, are set forth in the following description in order to provide a more thorough understanding of the present disclosure. However, as will be understood by those skilled in the art, the present disclosure may be practiced without these specific details.
As shown in fig. 1, the present invention provides a dynamic generation method based on a low-code design component, and a specific embodiment includes the following steps:
s1, configuring database connection information through a configuration management module.
S2, dragging and selecting a design component by a developer through a visualized low-code configuration interface, configuring parameters on the component, and storing page design.
S3, if the page does not have the generated database table, the system creates a database table which comprises a default field as an auto-increment main key and is named as a random character string; if the page has a generated database table, the next step is directly entered.
S4, dynamically generating field information according to the input component list, and using the component id as a database table field name, so that the dynamically generated database table field is bound with the design component.
S5, dynamically analyzing the type of the database table according to the type of the component, wherein when the type of the component is a common character component such as an input box, a text box and the like, the database table is automatically analyzed into a longtext type; when the component types are common numerical value type components such as a numerical value frame and an amount, the database table field is automatically analyzed into a double type, and the field length and the decimal number are set according to the component configuration.
And S6, comparing the field information generated in the last step with the field information of the existing TABLE, distinguishing the field list needing to be added, updated or deleted, and automatically generating a corresponding ALTER TABLE SQL sentence by combining the database TABLE field name in the step S3 and the database TABLE field type in the step S4.
And S7, executing the SQL statement generated in the step S6 according to the configured database connection information, and dynamically generating and updating the database table by the system.
It should be noted that, the technical solution of the present disclosure is not limited to the sequence of the steps, that is, the execution sequence of the steps may be arbitrarily arranged.
The embodiment of the invention also provides a dynamic generation system based on the low-code design component, which can be used for realizing the dynamic generation method based on the low-code design component, and comprises the following steps:
the configuration module is configured to configure database connection information; namely, the configuration management module: this module allows the developer to manage and configure various settings and parameters of the low code application, such as database connection information, etc.
The dragging module is configured to drag the design component and store the page;
the binding module is configured to bind the field names of the database tables of the pages to the id of the design component;
the dynamic analysis module is configured to dynamically analyze the type of the database table field according to the type of the component;
the SQL sentence generating module is configured to generate a corresponding ALTER TABLE SQL sentence;
and the database table updating module is configured to execute SQL sentences according to the configured database connection information and dynamically generate and update the database table.
Fig. 2 is a schematic diagram of an embodiment of an electronic device according to an embodiment of the disclosure. As shown in fig. 2, an embodiment of the disclosure provides an electronic device 1300 including a memory 1310, a processor 1320, and a computer program 1311 stored on the memory 1310 and executable on the processor 1320, the processor 1320 implementing the following steps when executing the computer program 1311: s1, configuring database connection information;
s2, dragging the design component and saving the page;
s3, binding the field names of the database tables of the pages to design component ids;
s4, dynamically analyzing the type of the database table field according to the type of the component;
s5, automatically generating a corresponding ALTER TABLE SQL sentence by combining the database TABLE field name in the step S3 and the database TABLE field type in the step S4;
and S6, executing the SQL statement generated in the step S5 according to the configured database connection information, and dynamically generating and updating the database table.
It should be noted that the computer readable medium shown in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). 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.
It is to be understood that the above embodiments are merely exemplary embodiments employed to illustrate the principles of the present disclosure, however, the present disclosure is not limited thereto. Various modifications and improvements may be made by those skilled in the art without departing from the spirit and substance of the disclosure, and are also considered to be within the scope of the disclosure.

Claims (8)

1. A dynamic generation method based on a low-code design component, which is characterized by comprising the following steps:
s1, configuring database connection information;
s2, dragging the design component and saving the page;
s3, binding the field names of the database tables of the pages to design component ids;
s4, dynamically analyzing the type of the database table field according to the type of the component;
s5, automatically generating a corresponding ALTER TABLE SQL sentence by combining the database TABLE field name in the step S3 and the database TABLE field type in the step S4;
and S6, executing the SQL statement generated in the step S5 according to the configured database connection information, and dynamically generating and updating the database table.
2. The dynamic generation method based on the low-code design component according to claim 1, wherein the step S2 specifically comprises:
and dragging and selecting the design component through a visualized low-code configuration interface, configuring parameters on the design component, and storing the page.
3. The low code design component based dynamic generation method of claim 1, wherein the step S2 further comprises:
judging whether a database table exists on the page or not; if the generated database table does not exist in the page, creating a database table which comprises a default field as an auto-increment main key and has a table name of a random character string; if the page has a generated database table, it proceeds directly to the next step S3.
4. The dynamic generation method based on the low-code design component according to claim 1, wherein the step S3 specifically comprises:
and dynamically generating field information according to the input design component, and taking the component id as a database table field name, so that the dynamically generated database table field is bound with the design component.
5. The dynamic generation method based on the low-code design component according to claim 1, wherein the step S4 specifically comprises:
when the component type is a common character component of an input box or a text box, automatically analyzing the database table field into a longtext type;
when the component type is a common numerical value type component of a numerical value frame and an amount, the database table field is automatically analyzed into a double type, and the field length and the decimal number are set according to the component configuration.
6. The dynamic generation method based on the low-code design component according to claim 1, wherein the step S5 specifically comprises:
and (3) comparing the field information generated in the last step S4 with the field information of the existing TABLE, distinguishing the field list needing to be added, updated or deleted, and automatically generating a corresponding ALTER TABLE SQL sentence by combining the database TABLE field name in the step S3 and the database TABLE field type in the step S4.
7. A low code design component based dynamic generation system operable to implement the low code design component based dynamic generation method of any one of claims 1 to 6, the system comprising:
the configuration module is configured to configure database connection information;
the dragging module is configured to drag the design component and store the page;
the binding module is configured to bind the field names of the database tables of the pages to the id of the design component;
the dynamic analysis module is configured to dynamically analyze the type of the database table field according to the type of the component;
the SQL sentence generating module is configured to generate a corresponding ALTER TABLE SQL sentence;
and the database table updating module is configured to execute SQL sentences according to the configured database connection information and dynamically generate and update the database table.
8. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the low code design component based dynamic generation method of any of claims 1 to 8.
CN202311780911.6A 2023-12-21 2023-12-21 Dynamic generation method and system based on low-code design component and electronic equipment Pending CN117742671A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311780911.6A CN117742671A (en) 2023-12-21 2023-12-21 Dynamic generation method and system based on low-code design component and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311780911.6A CN117742671A (en) 2023-12-21 2023-12-21 Dynamic generation method and system based on low-code design component and electronic equipment

Publications (1)

Publication Number Publication Date
CN117742671A true CN117742671A (en) 2024-03-22

Family

ID=90257410

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311780911.6A Pending CN117742671A (en) 2023-12-21 2023-12-21 Dynamic generation method and system based on low-code design component and electronic equipment

Country Status (1)

Country Link
CN (1) CN117742671A (en)

Similar Documents

Publication Publication Date Title
CN110019133B (en) Data online migration method and device
US9886245B2 (en) Software development tool using a workflow pattern that describes software applications
CN106062711B (en) Method, system, and computer storage medium for compound controls
CN108388622B (en) API interface dynamic generation method and device, computer equipment and storage medium
CN111198868B (en) Intelligent database-dividing real-time data migration method and device
US8381176B1 (en) Software build orchestration framework
US20160117291A1 (en) Conversion of a presentation to darwin information typing architecture (dita)
KR20110014146A (en) Dynamic declarative application description
CN105446725A (en) Method and system for model driven development
US20140181786A1 (en) Generating debugging extension source code utilizing debugging information
US9361086B1 (en) Collating and intelligently sequencing installation documentation
CN113111131B (en) Method and system for achieving Neo4j data synchronization based on Flink, and integration method and device
CN109284126B (en) Automatic class library updating method and device, electronic equipment and storage medium
CN111125064A (en) Method and device for generating database mode definition statement
CN113377342B (en) Project construction method and device, electronic equipment and storage medium
CN113568605A (en) Method, device and system for configuring constrained route
CN112632333A (en) Query statement generation method, device, equipment and computer readable storage medium
US20230004477A1 (en) Providing a pseudo language for manipulating complex variables of an orchestration flow
CN108037949B (en) Installation package multi-channel packaging method and device, computer equipment and storage medium
CN117742671A (en) Dynamic generation method and system based on low-code design component and electronic equipment
CN112988139B (en) Method and device for developing event processing file
US20110271245A1 (en) Clock alias for timing analysis of an integrated circuit design
Milovanović Python data visualization cookbook
CN109697141B (en) Method and device for visual testing
US20170060589A1 (en) Control flow graph analysis

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