CN113282283B - Method and device for operating database table and electronic equipment - Google Patents

Method and device for operating database table and electronic equipment Download PDF

Info

Publication number
CN113282283B
CN113282283B CN202110654780.1A CN202110654780A CN113282283B CN 113282283 B CN113282283 B CN 113282283B CN 202110654780 A CN202110654780 A CN 202110654780A CN 113282283 B CN113282283 B CN 113282283B
Authority
CN
China
Prior art keywords
database table
name
target database
target
file object
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110654780.1A
Other languages
Chinese (zh)
Other versions
CN113282283A (en
Inventor
张志伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Tuoke Network Technology Co ltd
Original Assignee
Beijing Tuoke Network 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 Beijing Tuoke Network Technology Co ltd filed Critical Beijing Tuoke Network Technology Co ltd
Priority to CN202110654780.1A priority Critical patent/CN113282283B/en
Publication of CN113282283A publication Critical patent/CN113282283A/en
Application granted granted Critical
Publication of CN113282283B publication Critical patent/CN113282283B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • 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/21Design, administration or maintenance of databases

Abstract

The invention provides a method and a device for operating a database table and electronic equipment, wherein the method comprises the following steps: setting a first file object for a target database table; when a target database table is operated, calling a first file object based on a compiler, and displaying one or more variable names corresponding to the target database table in an interface of the compiler; and determining the target variable name selected by the developer, and operating the target database table in a mode of referring to the target variable name. The method comprises the steps of creating a first file object used for defining corresponding variable names for field names, and when a database table needs to be operated, a developer can refer to the first file object, so that a compiler can automatically display the corresponding variable names, the developer does not need to memorize and input the field names, the developer can accurately position the required variable names in a selection mode, further operates the field names corresponding to the variable names, and the problem caused by manual input of the variable names is effectively avoided.

Description

Method and device for operating database table and electronic equipment
Technical Field
The invention relates to the technical field of databases, in particular to a method and a device for operating a database table, electronic equipment and a computer-readable storage medium.
Background
As a developer, the database is operated quite frequently in work, such as querying, modifying the database table and the like, and field names in the database table need to be brought when the database table is operated. Due to company business adjustment or personnel flow, a new developer a needs to take over the database table set by the other previous developer B, but at this time, the field name of the database table set by the previous developer B may be wrong or difficult to memorize, so that when the new developer a operates the database table, the field name input by the new developer a is easy to be wrong, thereby causing errors and influencing the efficiency of operating the database table.
Disclosure of Invention
In order to solve the existing technical problem, embodiments of the present invention provide a method and an apparatus for operating a database table, an electronic device, and a computer-readable storage medium.
In a first aspect, an embodiment of the present invention provides a method for operating a database table, including:
setting a first file object for a target database table, wherein the first file object is used for defining a corresponding variable name for a field name in the target database table;
when the target database table is operated, calling the first file object based on a compiler, and displaying one or more variable names corresponding to the target database table in an interface of the compiler;
determining a target variable name selected by a developer, and operating the target database table in a mode of referring to the target variable name; the target variable name is one of the displayed plurality of variable names.
In one possible implementation, the setting a first file object for the target database table includes:
setting a first file object of the target database table under a filter folder of a model folder.
In one possible implementation, the method further includes:
setting a second file object for the target database table, wherein the second file object is used for defining a corresponding attribute name for the field name in the target database table;
and after the target database table is operated, replacing the corresponding field name with the attribute name, and displaying a corresponding operation result.
In one possible implementation, the method further includes:
setting a mandatory filling identifier for part or all of the attribute names in the second file object;
and under the condition that the operation of the target database table is to add data to the target database table, if the attribute name corresponding to the target variable name is provided with a must fill identifier and a value corresponding to the target variable name does not exist, forbidding to execute the operation of the target database table.
In one possible implementation, the method further includes:
setting a basic file containing a standard primary key name of a database table, wherein the basic file is a file which can be inherited by the second file object;
and under the condition that the primary key name of the target database table is different from the standard primary key name, setting the primary key name of the target database table in the second file object.
In one possible implementation, the attribute name is text-matched with the variable name corresponding to the same field name.
In a second aspect, an embodiment of the present invention further provides an apparatus for operating a database table, where the apparatus includes:
the system comprises a first setting module, a second setting module and a third setting module, wherein the first setting module is used for setting a first file object for a target database table, and the first file object is used for defining a corresponding variable name for a field name in the target database table;
the compiling module is used for calling the first file object based on a compiler and displaying one or more variable names corresponding to the target database table in an interface of the compiler when the target database table is operated;
the processing module is used for determining a target variable name selected by a developer and operating the target database table in a mode of referring to the target variable name; the target variable name is one of the displayed plurality of variable names.
On the basis of the above embodiment, the apparatus further includes:
the second setting module is used for setting a second file object for the target database table, and the second file object is used for defining a corresponding attribute name for the field name in the target database table;
and the display module is used for replacing the corresponding field name with the attribute name and displaying a corresponding operation result after the processing module operates the target database table.
In a third aspect, an embodiment of the present invention provides an electronic device, including a bus, a transceiver, a memory, a processor, and a computer program stored on the memory and executable on the processor, where the transceiver, the memory, and the processor are connected via the bus, and when the computer program is executed by the processor, the method for operating a database table as described in any one of the above is implemented.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in the method for operating a database table described in any one of the above.
According to the method, the device, the electronic equipment and the computer readable storage medium for operating the database table, the first file object used for defining the corresponding variable name for the field name is created, when the database table needs to be operated, a developer can refer to the first file object, so that the compiler can automatically display the corresponding variable name, the developer does not need to memorize and input the field name, the developer can accurately position the required variable name in a selection mode, further, the field name corresponding to the variable name is operated, and the problem caused by manual input of the variable name is effectively avoided. In addition, the first file object can also define an error or improper field name as a standard variable name, so that the error field name does not influence the process of operating the database table by a developer.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or the background art of the present invention, the drawings required to be used in the embodiments or the background art of the present invention will be described below.
FIG. 1 is a flow chart illustrating a method of operating a database table provided by an embodiment of the present invention;
FIG. 2 is a flow chart of another method of operating a database table provided by an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an apparatus for operating a database table according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device for executing a method for operating a database table according to an embodiment of the present invention.
Detailed Description
The embodiments of the present invention will be described below with reference to the drawings.
In the embodiment of the invention, the database table refers to a table structure in the database, and the table structure comprises fields, main keys and the like of the table; typically, there are multiple table structures in a database, i.e., there are multiple database tables. The operation on the database table includes adding, deleting, inquiring, modifying and the like, namely adding data into the database table, deleting data in the database table, inquiring data in the database table and modifying data in the database table. FIG. 1 is a flow chart illustrating a method of operating a database table provided by an embodiment of the present invention. As shown in fig. 1, the method includes:
step 101: and setting a first file object for the target database table, wherein the first file object is used for defining corresponding variable names for the field names in the target database table.
In the embodiment of the invention, a database table which needs to be operated by a developer is taken as a target database table, and a file object which can be called, namely a first file object is preset for the target database table, wherein the first file object can be a php file. The first file object contains redefined variable names, and each variable name corresponds to a field name in the target database table. For example, a field NAME of a field in the target database table is "USERNAME", and a corresponding variable NAME, such as "NAME _ USERNAME", may be defined for the field; for example, NAME _ USERNAME = 'USERNAME', i.e., the value of the variable NAME is the corresponding field NAME.
Because a large amount of data exists in the database table, each field may contain millions or even billions of data, and if the field name in the database table is wrong or not in compliance with the specification, for example, the field name "username" is wrongly written as "uesrname", at this time, if the field name in the database table is directly changed, the database table is temporarily unavailable due to the excessive amount of data, which affects the normal operation of the service. The first object file provided by the embodiment of the invention only contains the definition mode of each field name, and is irrelevant to the size of the data volume in the target database table. Optionally, a first file object of the target database table is set under the filter folder of the model folder. In an embodiment of the present invention, the database is provided with a model folder "model", and one or more subfolders, such as a filter folder "filter", are located below the model folder.
Step 102: when the target database table is operated, calling the first file object based on the compiler, and displaying one or more variable names corresponding to the target database table in an interface of the compiler.
In the embodiment of the invention, when the target database table needs to be operated, a developer does not need to directly use the original field name, but uses the compiler to call the first file object, and then operates the corresponding variable name based on the compiler. In the programming process, the compiler can automatically display related variable names, and the characteristic of the compiler is utilized in the embodiment, so that a developer can automatically display corresponding variable names in an interface of the compiler when needing to operate a certain field name.
After the first file object is called, the encoder can directly display all variable names; or alternatively, a plurality of different variable names in the target database have the same prefix, i.e., the first several strings of variable names are the same. For example, the target database includes field names username, age, and email, and at this time, corresponding variable names may be set for the field names: NAME _ USERNAME, NAME _ AGE, NAME _ EMAIL, i.e., variable NAMEs have the same prefix "NAME". When the target database table needs to be operated, a developer only needs to input NAME (even only needs to input a letter 'N'), and the compiler can automatically display the variable NAME with the prefix for the developer to select.
Step 103: determining a target variable name selected by a developer, and operating a target database table in a mode of referring to the target variable name; the target variable name is one of the displayed plurality of variable names.
In the embodiment of the invention, after the variable names are displayed, developers can select the variable names needing to be operated at present, namely the target variable names; the target database table can then be operated by the target variable name without requiring the developer to remember the original field name.
According to the method for operating the database table, the first file object used for defining the corresponding variable name for the field name is created, when the database table needs to be operated, developers can refer to the first file object, so that a compiler can automatically display the corresponding variable name, the developers do not need to memorize and input the field name, the developers can accurately position the required variable name in a selection mode, further, the field name corresponding to the variable name is operated, and the problem caused by manual input of the variable name is effectively avoided. In addition, the first file object can also define an error or improper field name as a standard variable name, so that the error field name does not influence the process of operating the database table by a developer.
Optionally, the method further comprises the following steps a1-a 2.
Step A1: and setting a second file object for the target database table, wherein the second file object is used for defining corresponding attribute names for the field names in the target database table.
In the embodiment of the present invention, another file object, that is, a second file object, is also set for the target database table, and the second file object may also be a php file. Different from the first file object, the second file object is used for defining attribute names, and the attribute names are matched with the field names of the target database table one by one. For example, the field name of a field in the target database table is "UserName", and an attribute name "UserName" and the like can be set for the field name; in the case where the field name is correct, the attribute name may be the same as the field name. Typically, the attribute names are named using a naming scheme that conforms to a programming specification. Optionally, the second file object may also be under the model folder "model", such as under the data folder "data" of the model folder "model".
Step A2: and after the target database table is operated, replacing the corresponding field name by the attribute name, and displaying the corresponding operation result.
In the embodiment of the invention, after a developer operates a target database table based on a compiler, a corresponding operation result is displayed by using the attribute name; specifically, after the developer operates the target variable name, since the variable name and the attribute name both correspond to field names, that is, one field name corresponds to a unique variable name and an unique attribute name, there is also a correspondence between the variable name and the attribute name, and accordingly, the target variable name corresponds to the corresponding target attribute name, and at this time, the operation result of the target attribute name can be displayed. In the embodiment of the invention, the operation result is not displayed in a field name mode, but is displayed in a standard attribute name mode, so that the difficulty in understanding of developers caused by wrong or irregular field names can be avoided.
Optionally, the attribute name is matched with a variable name text corresponding to the same field name, that is, the attribute name and the variable name text corresponding to the same field name are matched, specifically, part of or all of the text of the attribute name and the text of the variable name are the same; the "same" may be the same in a broad sense regardless of case, or may be the same in a complete agreement, which is not limited in this embodiment. For example, the field NAME is "USERNAME", its variable NAME is "NAME _ USERNAME", and the attribute NAME is "USERNAME", i.e., the attribute NAME matches the "USERNAME" text in the variable NAME.
Optionally, the method further comprises the following steps B1-B2.
Step B1: and setting a necessary filling identifier for part or all of the attribute names in the second file object.
Step B1: and under the condition that the operation target database table is used for adding data into the target database table, if the attribute name corresponding to the target variable name is provided with the must-fill identifier and the value corresponding to the target variable name does not exist, forbidding executing the operation target database table.
Because some fields in the database table are necessary to be filled, the embodiment of the invention sets a necessary filling identifier for the attribute name; when data needs to be added into the target database table, if the operated attribute name (namely, the attribute name corresponding to the target variable name) is provided with the mandatory filling identifier, the operation of the added data is allowed only if the field name corresponding to the attribute name has a value (value), otherwise, the data addition is forbidden, namely, the operation of the target database table is forbidden. For example, a must-fill flag "true" may be set for the property names that must be filled, and no flag may be set for the remaining property names that are not necessarily filled.
On the basis of the above embodiment, the method further comprises the following steps C1-C2:
step C1: and setting a basic file containing the standard primary key name of the database table, wherein the basic file is a file which can be inherited by the second file object.
Step C2: in the case where the primary key name of the target database table is different from the standard primary key name, the primary key name of the target database table is set in the second file object.
In the embodiment of the invention, basic files, such as base.php files, are set for the integral database; and, in the second file object, inherits the base file. Wherein, the basic file comprises a standard primary key name; in general, the primary key name of a database table is a user name or ID, so the "ID" can be used as a standard primary key name. Different primary keys may be used for different database tables, for example, the primary key of a database table is "UserID". If the primary key name of the target database table is the same as the standard primary key name, the primary key of the target database table does not need to be additionally arranged; otherwise, if the two are different, the primary key name of the target database table needs to be set in the second file object.
The flow of the method of operating a database table is described in detail below by one embodiment. Referring to fig. 2, the method includes:
step 201: and setting a basic file for the database in advance, wherein the basic file comprises the standard primary key name of the database table in the database.
Step 202: and setting a first file object for the target database table, wherein the first file object is used for defining corresponding variable names for the field names in the target database table.
Step 203: setting a second file object for the target database table, wherein the second file object is used for defining a corresponding attribute name for the field name in the target database table; and, a padding flag is set for some or all of the attribute names in the second file object.
Alternatively, the primary key name of the target database table may also be set in the second file object.
Step 204: when the target database table is operated, calling the first file object based on the compiler, and displaying one or more variable names corresponding to the target database table in an interface of the compiler.
Step 205: and determining the target variable name selected by the developer, and operating the target database table in a mode of referring to the target variable name.
Step 206: and after the target database table is operated, replacing the corresponding field name by the attribute name, and displaying the corresponding operation result.
In addition, if the attribute name corresponding to the target variable name is provided with the padding flag and there is no value corresponding to the target variable name, execution of the operation target database table is prohibited.
According to the method for operating the database table, the first file object used for defining the corresponding variable name for the field name is created, when the database table needs to be operated, developers can refer to the first file object, so that a compiler can automatically display the corresponding variable name, the developers do not need to memorize and input the field name, the developers can accurately position the required variable name in a selection mode, further, the field name corresponding to the variable name is operated, and the problem caused by manual input of the variable name is effectively avoided. In addition, the first file object can also define an error or improper field name as a standard variable name, so that the error field name does not influence the process of operating the database table by a developer. The operation result is not displayed in a field name mode, but is displayed in a standard attribute name, so that the difficulty of understanding of developers due to field name errors or non-specification and the like can be avoided.
The method for operating a database table according to the embodiment of the present invention is described in detail above, and the method may also be implemented by a corresponding apparatus.
Fig. 3 is a schematic structural diagram illustrating an apparatus for operating a database table according to an embodiment of the present invention. As shown in fig. 3, the apparatus for operating a database table includes:
a first setting module 31, configured to set a first file object for a target database table, where the first file object is used to define a corresponding variable name for a field name in the target database table;
a compiling module 32, configured to, when the target database table is operated, call the first file object based on a compiler, and display one or more variable names corresponding to the target database table in an interface of the compiler;
the processing module 33 is configured to determine a target variable name selected by a developer, and operate the target database table in a manner of referring to the target variable name; the target variable name is one of the displayed plurality of variable names.
On the basis of the above embodiment, the apparatus further includes:
the second setting module is used for setting a second file object for the target database table, and the second file object is used for defining a corresponding attribute name for the field name in the target database table;
and the display module is used for replacing the corresponding field name with the attribute name and displaying a corresponding operation result after the processing module operates the target database table.
On the basis of the above embodiment, the setting module 31 sets a first file object for a target database table, including:
setting a first file object of the target database table under a filter folder of a model folder.
On the basis of the above-described embodiments,
the second setup module is further to: setting a mandatory filling identifier for part or all of the attribute names in the second file object;
the processing module 33 is further configured to: and under the condition that the operation of the target database table is to add data to the target database table, if the attribute name corresponding to the target variable name is provided with a must fill identifier and a value corresponding to the target variable name does not exist, forbidding to execute the operation of the target database table.
On the basis of the above embodiment, the apparatus further includes: a third setting module;
the third setting module is used for setting a basic file containing a standard primary key name of a database table, wherein the basic file is a file which can be inherited by the second file object;
the second setup module is further to: and under the condition that the primary key name of the target database table is different from the standard primary key name, setting the primary key name of the target database table in the second file object.
On the basis of the above embodiment, the attribute name is matched with the variable name text corresponding to the same field name.
In addition, an embodiment of the present invention further provides an electronic device, including a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and operable on the processor, where the transceiver, the memory, and the processor are connected via the bus, and when the computer program is executed by the processor, the processes of the method embodiment for operating a database table are implemented, and the same technical effects can be achieved, and are not described herein again to avoid repetition.
Specifically, referring to fig. 4, an embodiment of the present invention further provides an electronic device, which includes a bus 1110, a processor 1120, a transceiver 1130, a bus interface 1140, a memory 1150, and a user interface 1160.
In an embodiment of the present invention, the electronic device further includes: a computer program stored on the memory 1150 and executable on the processor 1120, the computer program when executed by the processor 1120 implementing the processes of the method embodiments of operating database tables described above.
A transceiver 1130 for receiving and transmitting data under the control of the processor 1120.
In embodiments of the invention in which a bus architecture (represented by bus 1110) is used, bus 1110 may include any number of interconnected buses and bridges, with bus 1110 connecting various circuits including one or more processors, represented by processor 1120, and memory, represented by memory 1150.
Bus 1110 represents one or more of any of several types of bus structures, including a memory bus, and memory controller, a peripheral bus, an Accelerated Graphics Port (AGP), a processor, or a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include: an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an Enhanced ISA (EISA) bus, a Video Electronics Standards Association (VESA), a Peripheral Component Interconnect (PCI) bus.
Processor 1120 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method embodiments may be performed by integrated logic circuits in hardware or instructions in software in a processor. The processor described above includes: general purpose processors, Central Processing Units (CPUs), Network Processors (NPs), Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), Complex Programmable Logic Devices (CPLDs), Programmable Logic Arrays (PLAs), Micro Control Units (MCUs) or other Programmable Logic devices, discrete gates, transistor Logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in embodiments of the present invention may be implemented or performed. For example, the processor may be a single core processor or a multi-core processor, which may be integrated on a single chip or located on multiple different chips.
Processor 1120 may be a microprocessor or any conventional processor. The steps of the method disclosed in connection with the embodiments of the present invention may be directly performed by a hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), a register, and other readable storage media known in the art. The readable storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
The bus 1110 may also connect various other circuits such as peripherals, voltage regulators, or power management circuits to provide an interface between the bus 1110 and the transceiver 1130, as is well known in the art. Therefore, the embodiments of the present invention will not be further described.
The transceiver 1130 may be one element or may be multiple elements, such as multiple receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. For example: the transceiver 1130 receives external data from other devices, and the transceiver 1130 transmits data processed by the processor 1120 to other devices. Depending on the nature of the computer system, a user interface 1160 may also be provided, such as: touch screen, physical keyboard, display, mouse, speaker, microphone, trackball, joystick, stylus.
It is to be appreciated that in embodiments of the invention, the memory 1150 may further include memory located remotely with respect to the processor 1120, which may be coupled to a server via a network. One or more portions of the above-described networks may be an ad hoc network (ad hoc network), an intranet (intranet), an extranet (extranet), a Virtual Private Network (VPN), a Local Area Network (LAN), a Wireless Local Area Network (WLAN), a Wide Area Network (WAN), a Wireless Wide Area Network (WWAN), a Metropolitan Area Network (MAN), the Internet (Internet), a Public Switched Telephone Network (PSTN), a plain old telephone service network (POTS), a cellular telephone network, a wireless fidelity (Wi-Fi) network, and combinations of two or more of the above. For example, the cellular telephone network and the wireless network may be a global system for Mobile Communications (GSM) system, a Code Division Multiple Access (CDMA) system, a Worldwide Interoperability for Microwave Access (WiMAX) system, a General Packet Radio Service (GPRS) system, a Wideband Code Division Multiple Access (WCDMA) system, a Long Term Evolution (LTE) system, an LTE Frequency Division Duplex (FDD) system, an LTE Time Division Duplex (TDD) system, a long term evolution-advanced (LTE-a) system, a Universal Mobile Telecommunications (UMTS) system, an enhanced Mobile Broadband (eMBB) system, a mass Machine Type Communication (mtc) system, an Ultra Reliable Low Latency Communication (urrllc) system, or the like.
It is to be understood that the memory 1150 in embodiments of the present invention can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. Wherein the nonvolatile memory includes: Read-Only Memory (ROM), Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), or Flash Memory.
The volatile memory includes: random Access Memory (RAM), which acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as: static random access memory (Static RAM, SRAM), Dynamic random access memory (Dynamic RAM, DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic random access memory (Double Data Rate SDRAM, DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct memory bus RAM (DRRAM). The memory 1150 of the electronic device described in the embodiments of the invention includes, but is not limited to, the above and any other suitable types of memory.
In an embodiment of the present invention, memory 1150 stores the following elements of operating system 1151 and application programs 1152: an executable module, a data structure, or a subset thereof, or an expanded set thereof.
Specifically, the operating system 1151 includes various system programs such as: a framework layer, a core library layer, a driver layer, etc. for implementing various basic services and processing hardware-based tasks. Applications 1152 include various applications such as: media Player (Media Player), Browser (Browser), for implementing various application services. A program implementing a method of an embodiment of the invention may be included in application program 1152. The application programs 1152 include: applets, objects, components, logic, data structures, and other computer system executable instructions that perform particular tasks or implement particular abstract data types.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned method for operating a database table, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The computer-readable storage medium includes: permanent and non-permanent, removable and non-removable media may be tangible devices that retain and store instructions for use by an instruction execution apparatus. The computer-readable storage medium includes: electronic memory devices, magnetic memory devices, optical memory devices, electromagnetic memory devices, semiconductor memory devices, and any suitable combination of the foregoing. The computer-readable storage medium includes: phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), non-volatile random access memory (NVRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic tape cartridge storage, magnetic tape disk storage or other magnetic storage devices, memory sticks, mechanically encoded devices (e.g., punched cards or raised structures in a groove having instructions recorded thereon), or any other non-transmission medium useful for storing information that may be accessed by a computing device. As defined in embodiments of the present invention, the computer-readable storage medium does not include transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses traveling through a fiber optic cable), or electrical signals transmitted through a wire.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, electronic device and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electrical, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to solve the problem to be solved by the embodiment of the invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present invention may be substantially or partially contributed by the prior art, or all or part of the technical solutions may be embodied in a software product stored in a storage medium and including instructions for causing a computer device (including a personal computer, a server, a data center, or other network devices) to execute all or part of the steps of the methods of the embodiments of the present invention. And the storage medium includes various media that can store the program code as listed in the foregoing.
In the description of the embodiments of the present invention, it should be apparent to those skilled in the art that the embodiments of the present invention can be embodied as methods, apparatuses, electronic devices, and computer-readable storage media. Thus, embodiments of the invention may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), a combination of hardware and software. Furthermore, in some embodiments, embodiments of the invention may also be embodied in the form of a computer program product in one or more computer-readable storage media having computer program code embodied in the medium.
The computer-readable storage media described above may take any combination of one or more computer-readable storage media. The computer-readable storage medium includes: an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of the computer-readable storage medium include: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only Memory (ROM), an erasable programmable read-only Memory (EPROM), a Flash Memory, an optical fiber, a compact disc read-only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any combination thereof. In embodiments of the invention, 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, device, or apparatus.
The computer program code embodied on the computer readable storage medium may be transmitted using any appropriate medium, including: wireless, wire, fiber optic cable, Radio Frequency (RF), or any suitable combination thereof.
Computer program code for carrying out operations for embodiments of the present invention may be written in assembly instructions, Instruction Set Architecture (ISA) instructions, machine related instructions, microcode, firmware instructions, state setting data, integrated circuit configuration data, or in one or more programming languages, including an object oriented programming language, such as: java, Smalltalk, C + +, and also include conventional procedural programming languages, such as: c or a similar programming language. The computer program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be over any of a variety of networks, including: a Local Area Network (LAN) or a Wide Area Network (WAN), which may be connected to the user's computer, may be connected to an external computer.
The method, the device and the electronic equipment are described through the flow chart and/or the block diagram.
It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions. These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, 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/acts specified in the flowchart and/or block diagram block or blocks.
These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing apparatus to function in a particular manner. Thus, the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
The above description is only a specific implementation of the embodiments of the present invention, but the scope of the embodiments of the present invention is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the embodiments of the present invention, and all such changes or substitutions should be covered by the scope of the embodiments of the present invention. Therefore, the protection scope of the embodiments of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method of operating a database table, comprising:
setting a first file object for a target database table, wherein the first file object is used for defining corresponding variable names for field names in the target database table, and the values of the variable names are corresponding field names;
when the target database table is operated, calling the first file object based on a compiler, and displaying one or more variable names corresponding to the target database table in an interface of the compiler;
determining a target variable name selected by a developer, and operating the target database table in a mode of referring to the target variable name; the target variable name is one of the displayed plurality of variable names.
2. The method of claim 1, wherein setting the first file object for the target database table comprises:
setting a first file object of the target database table under a filter folder of a model folder.
3. The method of claim 1 or 2, further comprising:
setting a second file object for the target database table, wherein the second file object is used for defining a corresponding attribute name for the field name in the target database table;
and after the target database table is operated, replacing the corresponding field name with the attribute name, and displaying a corresponding operation result.
4. The method of claim 3, further comprising:
setting a mandatory filling identifier for part or all of the attribute names in the second file object;
and under the condition that the operation of the target database table is to add data to the target database table, if the attribute name corresponding to the target variable name is provided with a must fill identifier and a value corresponding to the target variable name does not exist, forbidding to execute the operation of the target database table.
5. The method of claim 3, further comprising:
setting a basic file containing a standard primary key name of a database table, wherein the basic file is a file which can be inherited by the second file object;
and under the condition that the primary key name of the target database table is different from the standard primary key name, setting the primary key name of the target database table in the second file object.
6. The method of claim 3, wherein the attribute name is text-matched to the variable name corresponding to the same field name.
7. An apparatus for operating a database table, comprising:
the system comprises a first setting module, a second setting module and a third setting module, wherein the first setting module is used for setting a first file object for a target database table, the first file object is used for defining corresponding variable names for field names in the target database table, and the values of the variable names are the corresponding field names;
the compiling module is used for calling the first file object based on a compiler and displaying one or more variable names corresponding to the target database table in an interface of the compiler when the target database table is operated;
the processing module is used for determining a target variable name selected by a developer and operating the target database table in a mode of referring to the target variable name; the target variable name is one of the displayed plurality of variable names.
8. The apparatus of claim 7, further comprising:
the second setting module is used for setting a second file object for the target database table, and the second file object is used for defining a corresponding attribute name for the field name in the target database table;
and the display module is used for replacing the corresponding field name with the attribute name and displaying a corresponding operation result after the processing module operates the target database table.
9. An electronic device comprising a bus, a transceiver, a memory, a processor and a computer program stored on the memory and executable on the processor, the transceiver, the memory and the processor being connected via the bus, characterized in that the computer program, when executed by the processor, implements the steps in the method of operating a database table according to any of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps in the method of operating a database table according to any one of claims 1 to 6.
CN202110654780.1A 2021-06-11 2021-06-11 Method and device for operating database table and electronic equipment Active CN113282283B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110654780.1A CN113282283B (en) 2021-06-11 2021-06-11 Method and device for operating database table and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110654780.1A CN113282283B (en) 2021-06-11 2021-06-11 Method and device for operating database table and electronic equipment

Publications (2)

Publication Number Publication Date
CN113282283A CN113282283A (en) 2021-08-20
CN113282283B true CN113282283B (en) 2022-03-22

Family

ID=77284368

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110654780.1A Active CN113282283B (en) 2021-06-11 2021-06-11 Method and device for operating database table and electronic equipment

Country Status (1)

Country Link
CN (1) CN113282283B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541867A (en) * 2010-12-15 2012-07-04 金蝶软件(中国)有限公司 Data dictionary generating method and system
CN106354513A (en) * 2016-09-13 2017-01-25 济南浪潮高新科技投资发展有限公司 Layered development method for form
CN106919623A (en) * 2015-12-28 2017-07-04 航天信息股份有限公司 SQL query method and system
CN111552712A (en) * 2020-04-30 2020-08-18 中国平安财产保险股份有限公司 Report data extraction method and device and computer equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110088011A1 (en) * 2009-10-14 2011-04-14 Vermeg Sarl Automated Enterprise Software Development
CN108304463A (en) * 2017-12-26 2018-07-20 中国广核电力股份有限公司 A kind of data managing method and its database application component for database

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541867A (en) * 2010-12-15 2012-07-04 金蝶软件(中国)有限公司 Data dictionary generating method and system
CN106919623A (en) * 2015-12-28 2017-07-04 航天信息股份有限公司 SQL query method and system
CN106354513A (en) * 2016-09-13 2017-01-25 济南浪潮高新科技投资发展有限公司 Layered development method for form
CN111552712A (en) * 2020-04-30 2020-08-18 中国平安财产保险股份有限公司 Report data extraction method and device and computer equipment

Also Published As

Publication number Publication date
CN113282283A (en) 2021-08-20

Similar Documents

Publication Publication Date Title
US9226133B1 (en) Dynamic remotely managed SIM profile
CN110704398B (en) Database migration method and device from MySQL to Oracle and computer equipment
CN109636317B (en) Service control method, device, system and storage medium
CN110275916B (en) Data operation record storage method, system, device and equipment
CN109065054A (en) Speech recognition error correction method, device, electronic equipment and readable storage medium storing program for executing
CN107885540A (en) A kind of method, apparatus and terminal of loading application programs static resource
CN110610352B (en) Flow processing method and device, electronic equipment and computer readable storage medium
CN111506579B (en) Method, program and equipment for generating intelligent contract code
CN110968601A (en) Data query processing method and device
CN111581627A (en) Data processing method and device and electronic equipment
CN111090582A (en) Error code positioning method and device, storage medium and electronic equipment
MXPA04007146A (en) Method and apparatus for late-binding/dynamic pathname resolution.
CN109358833A (en) A kind of audio frequency playing method and system, a kind of calculating equipment and storage medium
CN111813465A (en) Information acquisition method, device, medium and equipment
CN111581183A (en) Data migration method and device based on data model
CN106156050B (en) Data processing method and device
CN113282283B (en) Method and device for operating database table and electronic equipment
US11204933B2 (en) Data manipulation record storage method, system, apparatus, and device
CN110941443B (en) Method and device for modifying file name in SDK (software development kit) and electronic equipment
JP2013045279A (en) Application evaluation information notice system, and application retrieval server
CN116680140A (en) Verification method, system, device and storage medium for processor
CN107665124B (en) Modular JavaScript file processing method, device and server
CN111694992A (en) Data processing method and device
CN111026800B (en) Data export method and device, electronic equipment and storage medium
CN108304188B (en) Data type conversion method and terminal

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
GR01 Patent grant
GR01 Patent grant