CN110287193A - A kind of document generating method, device, equipment and computer readable storage medium - Google Patents
A kind of document generating method, device, equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN110287193A CN110287193A CN201910570445.6A CN201910570445A CN110287193A CN 110287193 A CN110287193 A CN 110287193A CN 201910570445 A CN201910570445 A CN 201910570445A CN 110287193 A CN110287193 A CN 110287193A
- Authority
- CN
- China
- Prior art keywords
- enumeration
- database table
- data
- name
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 238000003860 storage Methods 0.000 title claims abstract description 12
- 238000012545 processing Methods 0.000 claims description 16
- 238000007710 freezing Methods 0.000 description 29
- 230000008014 freezing Effects 0.000 description 28
- 238000010586 diagram Methods 0.000 description 13
- 230000006870 function Effects 0.000 description 11
- 238000005516 engineering process Methods 0.000 description 8
- 238000012423 maintenance Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 238000004590 computer program Methods 0.000 description 5
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 4
- 238000011161 development Methods 0.000 description 4
- 230000003993 interaction Effects 0.000 description 4
- 238000013507 mapping Methods 0.000 description 3
- 239000002131 composite material Substances 0.000 description 2
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 238000003825 pressing Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000011144 upstream manufacturing Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/73—Program documentation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Library & Information Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
This application discloses a kind of document generating method, device, equipment and computer readable storage mediums, this method comprises: obtaining at least one electrical form in data dictionary, electrical form is used to describe the data structure of its corresponding database table;Table script is built according to the generation of at least one electrical form, this builds table script for generating database table;It executes this and builds table script, obtain at least one database table corresponding at least one electrical form;The file for being applied at least one database table is generated according at least one database table.
Description
Technical Field
The present application relates to the field of science and technology and financial technology (Fintech), and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for generating a file.
Background
With the development of computer technology, more and more technologies are applied in the financial field, the traditional financial industry is gradually changing to financial technology (Finteh), and the generation of code files is no exception, but due to the requirements of the financial industry on safety and real-time performance, higher requirements are also put forward on the technologies.
Mybatis is an Object Relational Mapping (ORM) development component that interacts with data based on the persistent layer framework of the Java programming language. Mybatis can use the detected xml files or annotations to configure and map native information, mapping interfaces and Java's simple Java Object (POJO) to records in the database. When generating Java files related to Mybatis, there are two Java file generation methods, one is a method of generating Java files by interacting with an interface, and the other is a method of generating Java files based on xml files. However, the data dictionary, the database and the Java code in the two Java file generation modes are not unified, and if the document is to be transmitted to the business and the upstream and downstream of the system, the data dictionary, the database and the Java code are not convenient to communicate with each other, which brings certain difficulty to the maintenance of the system.
Disclosure of Invention
The embodiment of the application provides a file generation method, a file generation device, file generation equipment and a computer readable storage medium, which are used for unifying a data dictionary, a database and codes and improving the system maintenance efficiency.
In a first aspect, a file generation method is provided, including: acquiring at least one spreadsheet in a data dictionary, wherein the spreadsheet is used for describing a data structure of a corresponding database table; generating a table building script according to the at least one electronic table, wherein the table building script is used for generating a database table; executing the table establishing script to obtain at least one database table corresponding to the at least one electronic table; and generating a file applied to the at least one database table according to the at least one database table.
Optionally, the spreadsheet is used for describing a data structure of a database table corresponding to the spreadsheet, and includes: the spreadsheet comprises a table name and attributes of each field, the fields comprise fields designated as primary keys, the attributes of the fields comprise field names and data types of the fields, and the data type of at least one field is an enumeration type.
Optionally, the generating a file applied to the at least one database table according to the at least one database table includes: generating a code for describing the enumeration type field according to the enumeration type field in the at least one database table, wherein the enumeration name of the enumeration type field in the code is that a non-number prefix is added to the enumeration type field on the basis of the enumeration name in the at least one database table.
Optionally, for all enumeration type fields in the at least one database table, in the code, the enumeration names of all enumeration type fields are added with non-numeric prefixes on the basis of the enumeration names in the at least one database table for the corresponding enumeration type fields; or, for a specific enumeration type field in the at least one database table, in the code, an enumeration name of the specific enumeration type field is added with a non-numeric prefix on the basis of an enumeration name in the at least one database table for a corresponding specific enumeration type; wherein the specific enumeration type field is an enumeration type field in which enumeration names in the at least one database table are named at the beginning of a number.
Optionally, the non-numeric prefix is an underlined prefix.
Optionally, the data types of the fields in the spreadsheet are consistent with the data types of the fields supported by the target database.
Optionally, a code for generating a common field is newly added to the form creating script, wherein the common field at least comprises an account identifier, a data processing date and a system time.
In a second aspect, a file generation apparatus is provided, including: an acquisition unit and a processing unit;
the acquisition module is used for acquiring at least one spreadsheet in the data dictionary, and the spreadsheet is used for describing a data structure of a corresponding database table; the processing unit is used for generating a table building script according to the at least one electronic table, and the table building script is used for generating a database table; executing the table establishing script to obtain at least one database table corresponding to the at least one electronic table; and generating a file applied to the at least one database table according to the at least one database table.
In a third aspect, a file generation device is provided, including: a processor, a memory and a file generation program stored on the memory and executable on the processor, the file generation program when executed by the processor implementing the steps of the file generation method according to the first aspect.
In a fourth aspect, there is provided a computer readable storage medium storing computer instructions which, when executed by a processor, implement the method of any one of the first aspects.
In the above embodiments of the present application, at least one spreadsheet in the data dictionary is obtained, where the spreadsheet is used to describe a data structure of a database table corresponding to the spreadsheet; generating a table building script according to at least one electronic table, and executing the table building script to obtain at least one database table corresponding to the at least one electronic table; and generating a file for application to the at least one database table based on the at least one database table. The database table and the generated file are generated based on the spreadsheet in the database dictionary, so that the unification of the database dictionary, the database and the code is realized, and compared with an interface or an xml file, the format of the spreadsheet enables a user to visually know the contents of the database and the code, thereby facilitating the operation and maintenance of a system and improving the user experience.
Drawings
Fig. 1 is a schematic flowchart of a file generation method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a file generation apparatus according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a file generation device according to an embodiment of the present application.
Detailed Description
The following detailed description of embodiments of the present application will be made with reference to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present application, are given by way of illustration and explanation only, and are not intended to limit the present application.
The data dictionary is a document for development, test and interaction between services, and changes of the services can experience changes of data, namely, the corresponding data dictionary can be modified. When the Java codes related to Mybatis are generated, in order to unify the data dictionary, the database and the Java codes, visually know the contents of the database and the Java codes and improve the user experience, the data dictionary is defined or modified.
The data dictionary in the embodiment of the present application describes a data structure of data in the form of a spreadsheet. The data dictionary definition is defined, i.e., the spreadsheet is defined. The contents to be defined in the spreadsheet include: table name, attribute of each field, the field includes the word designated as the primary key; the attribute of each field comprises a field name and a data type of the field, and the data type of at least one field is an enumeration type.
Wherein, the table name is used for identifying the table and is represented in a form of underlining letters; a general name of data having a field name of one column or one row, which is expressed in the form of an underlined letter; the data type of the field is used for representing the type of each field under the name of the field, and the defined data type of each field is consistent with the data type of the field supported by a target database (mysql), such as varchar, bigint and the like; the enumeration is used for representing a set corresponding to the field name, the enumeration type is represented in a form of 'capital letter underline-Chinese description', and then the enumeration name and the enumeration value corresponding to the enumeration name are represented in a form of 'number or capital letter-Chinese description' in a line-changing manner, or the enumeration name and the enumeration value corresponding to the enumeration name are directly represented in a form of 'number or capital letter-Chinese description'.
Optionally, one electronic form may further include a table name description for describing the table name, and a field description for describing the field name; in this way, the user can intuitively understand the spreadsheet and the information described by the fields.
Referring to table 1, this representation illustratively shows a definition table of frozen types in a data dictionary. As shown in the table, the table name of the defined electronic table is ba _ hold _ def, and the corresponding literal description (i.e. table name description) is a freezing type definition table; fields in the electronic watch comprise a frozen classification code (hold _ type), a frozen classification name (hold _ name), a frozen service type (hold _ biz _ type), a restriction type (hold _ process _ type), an excess freezing permission (excess _ flag), a freezing level (hold _ level), a same-level calculation mode (same _ level _ calc _ mode), a sub-account acceptance flag (act _ allow _ flag), an all-sub-account acceptance flag (all _ act _ allow _ flag), a client account acceptance flag (client _ allow _ flag), a manual acceptance permission flag (hold _ flag), a freezing number restriction flag (hold _ restriction _ num) and a description (hold _ mark); the data type of the freezing classification code is varchar (8), the data type of the freezing classification name is varchar (32), the data type of the freezing service type is varchar (1), the data type of the limiting type is varchar (10), the data type of the over-freezing permission is varchar (1), the data type of the freezing level is bigint (19), the data type of the same-level calculation mode is varchar (1), the data type of the sub-account acceptance mark is varchar (1), the data type of all the sub-account acceptance marks is varchar (1), the data type of the client account acceptance mark is varchar (1), the data type of the manual acceptance mark is varchar (1), the data type of the freezing number limiting mark is varchar (1), and the described data type is varchar (200).
Wherein, the field freezing classification code is the field of the primary key; the data types of the field freezing service type, the limitation type, the excess freezing permission, the freezing level, the same-level calculation mode, the sub-account number acceptance mark, all sub-account number acceptance marks, the client account number acceptance mark, the manual acceptance permission mark and the freezing number limitation mark are enumeration types.
The enumeration types of the field freezing service types comprise judicial freezing and bank payment stopping, wherein 1 is that the enumeration value corresponding to the enumeration name is judicial freezing, and 2 is that the enumeration value corresponding to the enumeration name is bank payment; the enumeration TYPEs of the restriction TYPEs comprise amount freezing, only payment without payment and no payment without payment, the enumeration value corresponding to the enumeration name HOLD _ PROCESS _ TYPE is the restriction TYPE, the enumeration value corresponding to the enumeration name AMTHOLD is the amount freezing, the enumeration value corresponding to the enumeration name DRBLOCK is only payment without payment, the enumeration value corresponding to the enumeration name CRBLOCK is only payment without payment, and the enumeration value corresponding to the enumeration name TOTALBLOCK is not payment; the enumeration type of the freezing level comprises first come and last come and no distinction, the enumeration value corresponding to the enumeration name 0 is first come and last come, and the enumeration value corresponding to the enumeration name 1 is no distinction; the enumeration types of the excess freezing permission comprise YES and NO, the enumeration value corresponding to the enumeration name of YES _ NO _ FLAG is a mark or not, the enumeration value corresponding to the enumeration name of Y is YES, and the enumeration value corresponding to the enumeration name of N is NO.
The field same-level calculation mode, the sub-account acceptance flag, all sub-account acceptance flags, the customer account acceptance flag, the manual acceptance permission flag, the number of times of freezing, and the enumeration type of the limit flag are similar to the enumeration type of the field excess freezing permission, and for the description, reference may be made to the description of the enumeration type of the excess freezing permission, which is not described herein again.
Table 1 definition table of freeze type
Optionally, the spreadsheet may further include an index, a partition field, and the like, and the application is not limited to the contents shown in table 1.
Optionally, the spreadsheet in the data dictionary is in excel format.
Based on the defined data dictionary, the embodiment of the application provides a file generation method, so that the data dictionary, the database and the codes are unified, and the contents of the database and the codes can be conveniently and visually known.
Fig. 1 is a schematic flow chart of a file generation method according to an embodiment of the present application.
As shown, the method flow includes:
s101: and acquiring at least one spreadsheet in the data dictionary, wherein the spreadsheet is used for describing the data structure of the corresponding database table.
Specifically, at least one excel file as defined in table 1 is acquired in the data dictionary, and a storage path of the at least one excel file is determined.
The spreadsheet comprises a table name and the attributes of each field, the fields comprise fields designated as primary keys, the field attributes comprise field names and data types of the fields, the data type of at least one field is an enumeration type, and the data type of the field in the spreadsheet is consistent with the data type of the field supported by mysql.
S102: a build script is generated from the at least one spreadsheet, the build script for generating the database table.
Specifically, a table building function, such as dictomysql. Executing the table building function can automatically generate table building sentences, and simultaneously generate main keys, indexes and remarks; if the data type of a field is an enumeration type, the enumeration type, all enumeration names and enumeration values corresponding to the enumeration names are listed in notes so as to be used in later development, operation and maintenance, maintenance and query.
Alternatively, a common field, which is not defined in the data dictionary, may be newly added in the table script by configuring and generating a common field, such as conf. In this way, the common fields do not need to be maintained in every spreadsheet in the data dictionary, reducing the complexity of the data dictionary.
S103: and executing the table building script to obtain at least one database table corresponding to the at least one electronic table.
And executing the table building script to generate at least one database table corresponding to the at least one spreadsheet in the database. Each database table is configured with a mysql data source and a data module, for example, ba in the table name shown in table 1 represents a bank (bank) module, and the configured mysql data source is data of a bank layer.
S104: a file applied to the at least one database table is generated from the at least one database table.
The generated file is a code file applied to a database table. Optionally, the code file is a Java file.
Specifically, according to the storage path of the at least one database table, and the data module and mysql data source corresponding to the at least one database table, a code generation function, such as mysql to java, is executed on the at least one database table, and a file applied to the at least one database table is generated. The generated files comprise entity classes, query related object classes, query DAO, Mapper, xml files corresponding to the Mapper, related composite primary keys and enumeration classes. In the generated file, the enumeration is subjected to serialization and deserialization processing, so that the message is convenient to assemble, and corresponding text descriptions are provided for different enumerations, so that the message is convenient to understand.
Optionally, a non-number prefix is configured for the enumerated name in the code generation function, so that the non-number prefix is added to the enumerated name in the generated file, and the problem that Java does not support numbers as the enumerated name is avoided. Specifically, according to an enumeration type field in at least one database table, generating a code for describing the enumeration type field, wherein an enumeration name of the enumeration type field is an enumeration name of the enumeration type field, and a non-numeric prefix is added to the enumeration name of the enumeration type field in the at least one database table.
Optionally, in one case, for all enumeration type fields in the at least one database table, in the code, the enumeration names of all enumeration type fields are non-numeric prefixes added to the enumeration names in the at least one database table for the corresponding enumeration type fields; in another case, for a specific enumeration type field in the at least one database table, in the code, an enumeration name of the specific enumeration type field is added with a non-numeric prefix on the basis of the enumeration name in the at least one database table for the corresponding specific enumeration type; wherein the specific enumeration type field is an enumeration type field in which enumeration names in the at least one database table are named at the beginning of a number.
Optionally, the non-numeric prefix is an underlined prefix. For example, the enumeration type of the field freeze level in table 1 includes first come and last come and no distinction, the new underline prefix is "_ 0" when the first come and last come to the corresponding enumeration name "0", and the first come and last to the corresponding enumeration name in the generated file is "_ 0".
The file generated in S104 will be described in detail below, taking the spreadsheet defined in table 1 and the generated file as Java files as examples.
Executing the flow shown in fig. 1 on the spreadsheet shown in table 1 to obtain a Java file, where a directory of the Java file includes a code (com.webbank.destination.ba.probability.domain) related to a bank freezing type, a class (com.webbank.destination.ba.probability.mapper) having data interaction based on mybank technology, and a common enumeration class (com.webbank.destination.common.environment) related to a bank freezing type; here, com.webbank.destination is a package name, that is, a file name, ba denotes a bank (bank) data module, and common denotes a common data module, and enumerated classes are classified into the common module in this embodiment of the present application.
The bank freeze type-related code mainly stores Java classes related to data operations, and may include, for example, baholddef.java, baholddefpk.java, and BaHoldDefCondition; the method comprises the steps that the database table ba _ hold _ def is a table, wherein, BaHoldDef.java represents an entity mapped with the database table ba _ hold _ def one by one, the mapping relation is defined in BaHoldDefMapper.xml, BaHoldDefPk.java represents a definition class of a composite primary key, and BaHoldDefCondition represents query correlation, so as to realize complex combined query.
Classes with data interaction based on mybatis technology include baholddefdao.java, baholddemapper.java, and baholddefmapper.xml; the method comprises the steps that the operation data of the method is a BaHoldDefDao.java, the BaHoldDeMapper.java is a data operation class realized according to mybatis specifications, the BaHoldDeMapper.xml is realized according to the mybatis specifications and comprises the step that BaHoldDef.java and a database table ba _ hold _ def are mapped one by one, and various database operations such as data addition and deletion change operation are carried out, parameters of the data operation of a user are transferred to an xml file, then the xml file is assembled into sql, and the sql is sent to a database, so that interaction with the database is completed.
The common enumeration class related to the bank freezing type includes all the enumeration types shown in table 1, such as the enumeration class of the freezing service type, holdbiztype. Limit type enumeration class, holdprocesstype. An enumeration class of a same-level computing mode, SameLevelCalcMode.
Through the generated Java file, the data can be added, deleted, modified and checked by a user. For example, selectByPk represents a push key query; selectByPkWithLock represents a primary key query and locks the current record; insert denotes insert data operation; update represents an update data operation; count represents counting the number of the strips according to conditions; deletebyContitoin indicates deletion of a record by a condition; deleteByPk indicates that the record is deleted by pressing the primary key, etc.
In the above embodiments of the present application, at least one spreadsheet in the data dictionary is obtained, where the spreadsheet is used to describe a data structure of a database table corresponding to the spreadsheet; generating a table building script according to at least one electronic table, and executing the table building script to obtain at least one database table corresponding to the at least one electronic table; and generating a file for application to the at least one database table based on the at least one database table. Because the database table and the file are generated based on the spreadsheet in the data dictionary, the unification of the data dictionary, the database and the code is realized, and compared with an interface or an xml file, the format of the spreadsheet enables a user to visually know the contents of the database and the code, thereby facilitating the operation and maintenance of a system and improving the user experience.
Based on the same technical concept, an embodiment of the present application further provides a file generation apparatus, where the file generation apparatus can implement the process executed in fig. 1 in the foregoing embodiment.
Fig. 2 is a schematic structural diagram of a file generation apparatus according to an embodiment of the present application.
As shown in the figure, the file generation apparatus includes an acquisition unit 201 and a processing unit 202.
The obtaining module 201 is configured to obtain at least one spreadsheet in the data dictionary, where the spreadsheet is used to describe a data structure of a corresponding database table.
The processing unit 202 is configured to generate a table creation script according to the at least one electronic table, where the table creation script is used to generate a database table; executing the table establishing script to obtain at least one database table corresponding to the at least one electronic table; and generating a file applied to the at least one database table according to the at least one database table.
Optionally, the one spreadsheet is used for describing a data structure of a database table corresponding to the spreadsheet, and includes: the electronic form comprises a table name and the attribute of each field, the field comprises the field designated as a primary key, the attribute of the field comprises the field name and the data type of the field, and the data type of at least one field is an enumeration type.
Optionally, the processing unit 202 is specifically configured to: generating a code for describing the enumeration type field according to the enumeration type field in the at least one database table, wherein the enumeration name of the enumeration type field in the code is that a non-number prefix is added to the enumeration type field on the basis of the enumeration name in the at least one database table.
Optionally, for all enumeration type fields in the at least one database table, in the code, the enumeration names of all enumeration type fields are added with non-numeric prefixes on the basis of the enumeration names in the at least one database table for the corresponding enumeration type fields; or, for a specific enumeration type field in the at least one database table, in the code, an enumeration name of the specific enumeration type field is added with a non-numeric prefix on the basis of an enumeration name in the at least one database table for a corresponding specific enumeration type; wherein the specific enumeration type field is an enumeration type field in which enumeration names in the at least one database table are named at the beginning of a number.
Optionally, the non-numeric prefix is an underlined prefix.
Optionally, the data types of the fields in the spreadsheet are consistent with the data types of the fields supported by the target database.
Optionally, a code for generating a common field is newly added to the form creating script, wherein the common field at least comprises an account identifier, a data processing date and a system time.
Based on the same technical concept, embodiments of the present application further provide a file generation device, where the file generation device can implement the process executed in fig. 1 in the foregoing embodiments.
Fig. 3 shows a schematic structural diagram of a file generation device 300 provided in an embodiment of the present application, that is, shows another schematic structural diagram of the file generation apparatus 200. Referring to fig. 3, the file generation apparatus 300 includes a processor 301, a memory 302, and a file generation program (not shown) stored in the memory and running on the processor, and when executed by the processor, the file generation program implements the steps shown in fig. 1. The processor 301 is configured to enable the terminal to perform the functions involved in the aforementioned procedures. The memory 302 is used for coupling with the processor 301 and holds the necessary program instructions and data for the terminal. The processor 301 is connected to the memory 302, the memory 302 is used for storing instructions, and the processor 301 is used for executing the instructions stored in the memory 302 to complete the steps of the method for the client device to execute the corresponding functions.
In the embodiment of the present application, for concepts, explanations, and detailed descriptions related to the technical solutions provided in the embodiment of the present application, and other steps related to the file generating apparatus 200 and the file generating device 300, please refer to the descriptions of the foregoing methods or the other embodiments for these contents, which are not described herein again.
It should be noted that the processor referred to in the embodiments of the present application may be a Central Processing Unit (CPU), a general purpose processor, a Digital Signal Processor (DSP), an application-specific integrated circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic devices, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. A processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, a DSP and a microprocessor, or the like. Wherein the memory may be integrated in the processor or may be provided separately from the processor.
Based on the same technical concept, the embodiment of the application also provides a computer readable storage medium. The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the process performed in fig. 1.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
Claims (10)
1. A file generation method, comprising:
acquiring at least one spreadsheet in a data dictionary, wherein the spreadsheet is used for describing a data structure of a corresponding database table;
generating a table building script according to the at least one electronic table, wherein the table building script is used for generating a database table;
executing the table establishing script to obtain at least one database table corresponding to the at least one electronic table;
and generating a file applied to the at least one database table according to the at least one database table.
2. The method of claim 1, wherein the spreadsheet is used to describe the data structure of its corresponding database table, including:
the spreadsheet comprises a table name and attributes of each field, the fields comprise fields designated as primary keys, the attributes of the fields comprise field names and data types of the fields, and the data type of at least one field is an enumeration type.
3. The method of claim 2, wherein said generating a file for application to the at least one database table from the at least one database table comprises:
generating a code for describing the enumeration type field according to the enumeration type field in the at least one database table, wherein the enumeration name of the enumeration type field in the code is that a non-number prefix is added to the enumeration type field on the basis of the enumeration name in the at least one database table.
4. The method of claim 3, wherein for all enumeration type fields in the at least one database table, the code is added with a non-numeric prefix for the enumeration name of the all enumeration type fields to the corresponding enumeration type field on the basis of the enumeration name in the at least one database table; or,
for a specific enumeration type field in the at least one database table, in the code, an enumeration name of the specific enumeration type field is added with a non-numeric prefix on the basis of the enumeration name in the at least one database table for a corresponding specific enumeration type; wherein the specific enumeration type field is an enumeration type field in which enumeration names in the at least one database table are named at the beginning of a number.
5. The method of claim 4, wherein the non-numeric prefix is an underlined prefix.
6. The method of claim 1, wherein the data types of the fields in the spreadsheet are consistent with the data types of the fields supported by the target database.
7. The method of claim 1, wherein a code is newly added to the build script that generates common fields that include at least an account identification, a data processing date, and a system time.
8. A file generation apparatus, comprising: an acquisition unit and a processing unit;
the acquisition module is used for acquiring at least one spreadsheet in the data dictionary, and the spreadsheet is used for describing a data structure of a corresponding database table;
the processing unit is used for generating a table building script according to the at least one electronic table, and the table building script is used for generating a database table; executing the table establishing script to obtain at least one database table corresponding to the at least one electronic table; and generating a file applied to the at least one database table according to the at least one database table.
9. A file generating apparatus, characterized by comprising: a processor, a memory and a file generation program stored on the memory and executable on the processor, the file generation program when executed by the processor implementing the steps of the file generation method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the storage medium stores computer instructions which, when executed by a processor, implement the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910570445.6A CN110287193A (en) | 2019-06-27 | 2019-06-27 | A kind of document generating method, device, equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910570445.6A CN110287193A (en) | 2019-06-27 | 2019-06-27 | A kind of document generating method, device, equipment and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110287193A true CN110287193A (en) | 2019-09-27 |
Family
ID=68019980
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910570445.6A Pending CN110287193A (en) | 2019-06-27 | 2019-06-27 | A kind of document generating method, device, equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110287193A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110389955A (en) * | 2019-07-13 | 2019-10-29 | 北京海致星图科技有限公司 | A kind of data warehouse scheduling file automatic creation system and generation method |
CN110990412A (en) * | 2019-12-25 | 2020-04-10 | 中国银行股份有限公司 | Data structure design method and device |
CN112069773A (en) * | 2020-07-23 | 2020-12-11 | 北京三快在线科技有限公司 | Data processing system, method, apparatus, electronic device, and computer-readable medium |
CN115797031A (en) * | 2022-11-01 | 2023-03-14 | 中电金信软件(上海)有限公司 | Freezing control method and device for business transaction, computer equipment and storage medium |
-
2019
- 2019-06-27 CN CN201910570445.6A patent/CN110287193A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110389955A (en) * | 2019-07-13 | 2019-10-29 | 北京海致星图科技有限公司 | A kind of data warehouse scheduling file automatic creation system and generation method |
CN110990412A (en) * | 2019-12-25 | 2020-04-10 | 中国银行股份有限公司 | Data structure design method and device |
CN110990412B (en) * | 2019-12-25 | 2023-09-19 | 中国银行股份有限公司 | Data structure design method and device |
CN112069773A (en) * | 2020-07-23 | 2020-12-11 | 北京三快在线科技有限公司 | Data processing system, method, apparatus, electronic device, and computer-readable medium |
CN115797031A (en) * | 2022-11-01 | 2023-03-14 | 中电金信软件(上海)有限公司 | Freezing control method and device for business transaction, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110287193A (en) | A kind of document generating method, device, equipment and computer readable storage medium | |
Sevilla Ruiz et al. | Inferring versioned schemas from NoSQL databases and its applications | |
US7792793B2 (en) | Data export/import from multiple data source to a destination data repository using corresponding data exporters and an importer | |
US7487174B2 (en) | Method for storing text annotations with associated type information in a structured data store | |
US7673282B2 (en) | Enterprise information unification | |
US9245011B2 (en) | Data model versioning for document databases | |
US20140289243A1 (en) | Method and system for centralized issue tracking | |
TW201140350A (en) | High throughput, reliable replication of transformed data in information systems | |
CN111125229A (en) | Data blood margin generation method and device and electronic equipment | |
CN113110832A (en) | Intelligent efficient code generation method and device and storage medium | |
CN103678396B (en) | A kind of data back up method and device based on data model | |
US7720872B1 (en) | Software interface mapping tool | |
CN114564500A (en) | Method and system for implementing structured data storage and query in block chain system | |
Agrawal et al. | An enhanced extract-transform-load system for migrating data in telecom billing | |
CN116701355A (en) | Data view processing method, device, computer equipment and readable storage medium | |
Zhang et al. | Representing and reasoning about xml with ontologies | |
CN115048456A (en) | User label generation method and device, computer equipment and readable storage medium | |
CN115390936A (en) | Unified verification method, device, equipment and storage medium | |
Ren et al. | Rules and implementation for generating Ontology from relational database | |
CN114356945A (en) | Data processing method, data processing device, computer equipment and storage medium | |
Orsi | Context based querying of dynamic and heterogeneous information sources. | |
Brandt et al. | Linked data for the international aid transparency initiative | |
Lawrence | Automatic Conflict Resolution to Integrate Relational Schema | |
CN113449005B (en) | Account management method and device | |
US20240296079A1 (en) | Message-based management of knowledge graphs representing application programming interfaces |
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 |