CN111367932B - Database form change notification method, device, computer equipment and storage medium - Google Patents
Database form change notification method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN111367932B CN111367932B CN202010151722.2A CN202010151722A CN111367932B CN 111367932 B CN111367932 B CN 111367932B CN 202010151722 A CN202010151722 A CN 202010151722A CN 111367932 B CN111367932 B CN 111367932B
- Authority
- CN
- China
- Prior art keywords
- change notification
- attribute
- parameter
- event
- 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.)
- Active
Links
- 230000008859 change Effects 0.000 title claims abstract description 146
- 238000000034 method Methods 0.000 title claims abstract description 136
- 230000006870 function Effects 0.000 claims abstract description 26
- 238000004590 computer program Methods 0.000 claims description 10
- 238000003780 insertion Methods 0.000 claims description 8
- 230000037431 insertion Effects 0.000 claims description 8
- 230000000977 initiatory effect Effects 0.000 claims description 7
- 238000012546 transfer Methods 0.000 claims description 6
- 230000008447 perception Effects 0.000 abstract description 2
- 230000004044 response Effects 0.000 abstract description 2
- 230000000875 corresponding effect Effects 0.000 description 14
- 230000008569 process Effects 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 5
- 230000009471 action Effects 0.000 description 3
- 238000011161 development Methods 0.000 description 3
- 238000013459 approach Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011981 development test Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
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/23—Updating
- G06F16/2358—Change logging, detection, and notification
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a database form change notification method, a device, computer equipment and a storage medium, wherein the method comprises the following steps: adding an event for uniformly receiving and forwarding change notification and an attribute for marking a method of a functional interface to service interface engineering of a database code; the code generator checks whether the method of each function interface in the event handler contains the attribute; if the attribute is included, automatically adding codes for transmitting change notification parameters after the corresponding method; when the database form is changed, the method is executed, a change notification is initiated, and the change notification is transmitted to the event and forwarded by the event. The invention solves the problem of the perception of the change of the database data by the program code and informs other parts of the program of the perceived change so as to realize the response to the change.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a database form change notification method, a database form change notification device, a computer device, and a storage medium.
Background
When a user enters a form in a terminal device (e.g., an application, a handheld device, a web page, etc.) and requests to be delivered in a form, the server device at the back-end begins to perform the corresponding action. The user wants to see the information of the delivery status of the form, such as the delivery amount that each cargo has completed, and the terminal needs to redisplay the information when necessary in order to implement the function of the inquiry status, so the terminal needs to know when to perform the redisplay. Specifically, there are several methods for achieving the above functions:
one method (i.e., scheme 1) is to refresh at regular time, i.e., whether the current execution state is changed or not, the terminal automatically re-acquires the data at certain time intervals and displays the data on the interface;
another method is that the server actively pushes data to the terminal (i.e. after the server finds that the data changes, the server actively pushes the changed data to the terminal), and the terminal displays the received data on the interface. For the second method, the server needs to know whether the data in the database has been changed, and there are three general solutions to this problem: firstly, the method is realized through the self functions of the database, for example, a trigger and a database reverse calling program (namely scheme 2) are utilized; secondly, using a real-time monitoring function provided by a database client (namely scheme 3); thirdly, when the code appears to modify the database, other program parts are actively informed (i.e. scheme 4).
Regarding the above four schemes, although each scheme proposes a solution, in actual operation, each scheme has a certain drawback, for example, in scheme 1, refresh time is difficult to predict, and at the same time, a high density is heavy to a server load, and low density information is slow to update. And because whether the data change can not be predicted, the data consumption generated by refreshing does not necessarily generate actual value, thereby reducing the working efficiency;
in scheme 2, complex coding is required on the database, and advanced functions of the database are required for back call, which has clear requirements on version and functions of the database, and when triggers and transactions are used simultaneously, a plurality of data problems can be generated;
in scheme 3, it may be implemented using a third party function class library (e.g., sql dependency ex published by dyatchenko on github) or a database developer provided function (e.g., sql dependency of microsoft), but this approach is not stable, because none of the above components is guaranteed to be valid at all times and cannot guarantee to grab all changes of interest to the user;
in scheme 4, since the data changer and the terminal developer are not usually the same developer, there may be some difference in definition and understanding of the data structure. In addition, in many cases, the data changer does not use the function, and the developer may have different understanding of the scene and inexhaustible development test. In addition, because the work of a terminal developer is lagged and a plurality of data needs to be docked, the inconsistency of a data interface is easy to cause, and the development difficulty is increased.
Thus, how to eliminate the drawbacks of the above-mentioned several methods is a problem that a person skilled in the art needs to solve.
Disclosure of Invention
The embodiment of the invention provides a database form change notification method, a device, computer equipment and a storage medium, which aim to solve the problem that program codes perceive change of database data and notify other parts of a program of the perceived change so as to respond to the change.
In a first aspect, an embodiment of the present invention provides a method for notifying a database form change, where the method includes:
adding an event for uniformly receiving and forwarding change notification and an attribute for marking a method of a functional interface to service interface engineering of a database code;
the code generator checks whether the method of each function interface in the event handler contains the attribute;
if the attribute is included, automatically adding codes for transmitting change notification parameters after the corresponding method;
when the database form is changed, the method is executed, a change notification is initiated, and the change notification is transmitted to the event and forwarded by the event.
Further, the attribute includes: a first attribute for marking on a method of a functional interface and a second attribute for marking on a parameter of a method of a functional interface.
Further, the delivering the change notification to the event includes:
transmitting a parameter of a change notification to the event, wherein the parameter of the change notification comprises: the name of the change notification, the name of the parameter table and the database instance.
Further, the parameters of the change notification further include: one or more of a return value of the method, a transaction token, and a context token.
Further, the first attribute includes: the name of the change notification, the parameter table to be included, whether the return value needs to be included, and whether the return value needs to be recorded as a parameter; the second attribute includes: the parameters contained in the parameter table and the aliases specified by the parameters are required.
Further, the method of the functional interface includes: database form insertion and database form updating.
Further, the delivering the change notification to the event includes:
and transmitting the change notification caused by the bottom layer code to the upper layer code layer by layer and finally transmitting the change notification to the event.
In a second aspect, an embodiment of the present invention further provides a database form change notification apparatus, including:
an adding unit, configured to add an event for uniformly receiving and forwarding the change notification and an attribute for marking a method of the functional interface to the service interface engineering of the database code;
a checking unit for checking whether the method of each function interface in the event handler contains the attribute by the code generator;
an adding unit, configured to automatically add a code for delivering a change notification parameter after the corresponding method if the attribute is included;
and the triggering unit is used for executing the method when the database form is changed, triggering a change notification, transmitting the change notification to the event and forwarding the event.
In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the database form change notification method described above when executing the computer program.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium, where a computer program is stored, where the computer program is executed by a processor to implement the database form change notification method described above.
The embodiment of the invention provides a database form change notification method, which comprises the following steps: adding an event for uniformly receiving and forwarding change notification and an attribute for marking a method of a functional interface to service interface engineering of a database code; the code generator checks whether the method of each function interface in the event handler contains the attribute; if the attribute is included, automatically adding codes for transmitting change notification parameters after the corresponding method; when the database form is changed, the method is executed, a change notification is initiated, and the change notification is transmitted to the event and forwarded by the event. The embodiment of the invention solves the problem of the perception of the change of the database data by the program code and informs other parts of the program of the perceived change so as to realize the response to the change.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a database form change notification method according to an embodiment of the present invention;
fig. 2 is a schematic block diagram of a database form change notification apparatus according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Referring to fig. 1, fig. 1 is a flowchart of a method for notifying database form changes according to an embodiment of the present invention, which specifically includes: steps S101 to S104.
S101, adding an event for uniformly receiving and forwarding change notification and an attribute for marking a method of a functional interface on service interface engineering of a database code;
s102, the code generator checks whether the method of each functional interface in the event processing program contains the attribute;
s103, if the attribute is included, automatically adding codes for transmitting change notification parameters after the corresponding method;
and S104, when the database form is changed, executing the method, triggering a change notification, transmitting the change notification to the event, and forwarding the event.
In this embodiment, the user only needs to connect the event processing program (i.e. the method of the functional interface) written by himself to the event (databaseoperationnotes) of the service interface engineering, and the code generator will check the method of the functional interface to determine whether it is marked with the corresponding attribute, if so, then automatically generate the corresponding code after the method of the functional interface. When the database form is changed, the corresponding method starts to be executed when the database form is changed, and the program code can initiate the event through the input change notification in the code, so that the event forwards the change notification.
Compared with the four schemes mentioned in the background art, for example, compared with the scheme 1, the method provided by the embodiment does not need to perform timing inquiry and refresh, and does not actively perform refresh when refresh is not needed, so that server resources are saved; for example, compared with the scheme 2, the embodiment does not need to write triggers in the database, does not need to use the advanced functions of the database, does not depend on high-version database components, and further does not influence the performance of the database; also, for example, compared with the scheme 3, the present embodiment does not have unstable conditions, nor does it have a change notification lost; for example, compared with the scheme 4, the method and the device for realizing the automatic coding in the embodiment use an automatic coding technology, so that the design goal of the scheme 4 is completely realized, the workload required by a user for completing the scheme 4 is not needed, the codes are ensured to accord with the unified standard, the consistency of functions of different components is ensured, the workload is reduced, the development difficulty is reduced, and the user has better experience.
In addition, since the program database is not usually suggested to be directly modified by a third party, and since the method provided by the embodiment of the invention is based on an automatic generation technology, various distributed deployment models (the distributed deployment model refers to that the program is scattered into a plurality of independent components and deployed in the same computing or multiple computing, and therefore, change notification depends on effective communication among the components) can be effectively compatible. The method provided by the embodiment of the invention is based on an automatic generation technology, the generation end only needs to encode the distributed function once, and the scheme 4 mentioned in the background technology needs to manually realize the support of the distributed model each time by a developer, so that under the general use condition, the related limitation (namely, when the database is modified outside the program range) is not obvious to the method provided by the embodiment of the invention.
In one embodiment, the attributes include: a first attribute for marking on a method of a functional interface and a second attribute for marking on a parameter of a method of a functional interface.
In this embodiment, the attribute is marked on a method of a function interface written by a user, and is used by the code generator to determine whether to add a corresponding code after the method. Specifically, the attributes include a first attribute and a second attribute, wherein the first attribute (databaseoperationnotifiattribute) is marked on a method, and is used for explaining that a change notification event needs to be initiated after the method is executed; a second attribute (databaseoperationnotifiarameterattribute) is marked on the parameter of the method to illustrate that this parameter needs to be included in the change notification event and an alias can be assigned to this parameter.
Note that the tag attribute itself does not have any function. For marking the first attribute, the code of the code generator checks whether each method has the mark of the first attribute, and processes the method with the mark of the first attribute correspondingly; for marking the second attribute, the code of the code generator checks whether each parameter of the method containing the first attribute marking has the second attribute marking, and processes the parameter having the second attribute marking accordingly. The method (or parameters of the method) is marked, except that the user states that this method requires the above-described processing (i.e. automatically adding a code for delivering change notification parameters after the method containing the attributes).
It should be further noted that, since the first attribute DatabaseOperationNotifiableAttribute provides a common and simple way, that is, the user is required to provide other information, and meanwhile, all parameters to be processed in the method are provided at one time, but there are two limitations in this way: firstly, the method is not intuitive, and is not as intuitive as directly marking parameters; secondly, this approach cannot support the parameter alias functionality, so in this embodiment, the second attribute is present as a complement to the first attribute. When the alias function cannot be used, a parameter to be included in the change notification can be defined in the first attribute databaseoperationnotifiattribute or can be independently marked by the second attribute databaseoperationnotifiaratetrattribute.
In an embodiment, said delivering said change notification to said event comprises:
transmitting a parameter of a change notification to the event, wherein the parameter of the change notification comprises: the name of the change notification, the name of the parameter table and the database instance.
In this embodiment, the parameter included in the change notification is transferred to the event. The parameters in this embodiment (i.e., the name of the change notification, the name of the parameter table, and the database instance) are parameters that must be included in the change notification.
In an embodiment, the parameters of the change notification further include: one or more of a return value of the method, a transaction token, and a context token.
In this embodiment, when the method of the functional interface has a return value, the return value of the method is included in the change notification parameter; when the method of the functional interface uses the transaction, the transaction token of the transaction is contained in the change notification parameter; when the method of the function interface uses the database context, then the context token of the context is included in the change notification parameter. When one or more of the above-mentioned scenes occurs, the corresponding one or more parameters may be included in the parameters of the change notification. Wherein the Transaction token and the context token are concepts defined in the service interface engineering for uniquely determining a Transaction (Transaction) being executed and a database operation context (DbContext).
In an embodiment, the first attribute includes: the name of the change notification, the parameter table to be included, whether the return value needs to be included, and whether the return value needs to be recorded as a parameter; the second attribute includes: the parameters contained in the parameter table and the aliases specified by the parameters are required.
In this embodiment, when the method of the first attribute flag is executed, it is described that the change notification initiation event needs to be transmitted, and the change notification, that is, the parameter of the change notification needs to be transmitted, so the parameter in this embodiment needs to be transmitted. It should be noted that, the parameter of the change notification does not necessarily include "whether the return value needs to be recorded as a parameter", in other words, when the user considers that the return value of the method is necessary as the content of the change notification, the return value of the method is recorded as a parameter, and a name is set for the parameter according to the corresponding specification of the user; when the user considers that the return value of the method is not necessary to be used as the content of the change notice, the return value of the method does not need to be recorded as a parameter, and the function can improve the convenience when the user uniformly processes one type of data.
It is also noted that "whether the return value needs to be recorded as a parameter" is independent of "whether the return value needs to be included". For example, when a user processes an order change, the user needs to know the changed order entity, and when the order is newly added, the return value of the method is the order entity; at the time of order update, one of the parameters is the order entity. In order to facilitate the user to process the order change from different methods by using a unified processing program, the method is allowed to store the return value of the method as a parameter in a parameter table of a change notification event when the order is newly added, so that the processing program can extract the parameters uniformly.
In one embodiment, the method of the functional interface includes: database form insertion and database form updating.
In this embodiment, the method of the function interface written by the user includes insertion and update of the database form, where the update of the database form is understood as adding and deleting the database form, that is, when the insertion and update (i.e. adding and deleting) of the database form occurs, the corresponding method starts to be executed, and the change notification triggering event is transmitted.
In an embodiment, said delivering said change notification onto said event comprises:
and transmitting the change notification caused by the bottom layer code to the upper layer code layer by layer and finally transmitting the change notification to the event.
In this embodiment, when the database form is changed, the corresponding method (i.e., the bottom code) starts to execute, and at the same time, a change notification is triggered, and the method has multiple layers of codes to manage the database form, so that the user can conveniently call the database form, and therefore, the change notification needs to be transferred up layer by layer through the multiple layers of codes, and finally reaches the service interface project interacted with the user codes, and an event is triggered.
After the method provided by the embodiment of the invention is used, the workload of a user is reduced, the development difficulty is reduced, and the user has good experience. For example, when a change notification is required to be sent, a user only needs to add attribute description on the original interface method for generating the database code; when the change notification needs to be monitored, the user only needs to process the change notification event on the outermost interface of the database component.
For example, in an order form operation, the user adds a new function, and adds a change notification of the method Create, update and Delete (2 items), which is specifically described as follows:
the Create requests the change notification name OrderUpdated, does not include the return value (the second parameter false), and needs to save the return value (the newly created order Entity) in the change notification parameter table with the Entity name;
update requires the change notification name OrderUpdated, does not include the return value (second parameter false), and requires the incoming OrderHead parameter to be saved in the change notification's parameter table with the Entity name;
the first Delete requires the change notification to be OrderDeleted, does not include the return value (the second parameter false), and requires that id, counterPlusOne two parameters be saved in the change notification's parameter table as the original name of the parameters;
the second Delete requires the change notification to be named OrderDeleted, does not include the return value (second parameter false), and requires the incoming OrderHead parameter to be saved in the change notification's parameter table named Entity.
The parameters to be returned are directly marked by using the first attribute of the DatabaseOperationNotifiable, and the names of the parameters are only required to be given in sequence from the third parameter, but the names of the parameters cannot be given under the requirement of a grammar format, and the parameters can only be stored in a parameter table of a change notification by taking the names of the parameters as names. The parameter to be included is directly marked with the second attribute, and an alias of the parameter can be given and stored in the parameter table of the change notification by another name.
The user only needs to connect the event handler written by himself to the databaseoperationnotes of the interface object (service interface project), and the program code can respond to the change notification by himself internally through the imported Name, parameters, return, databaseInstance, databaseTransactionToken, databaseContextToken. In the above example, both order insertion and order update use OrderUpdated as change notification, and the order Entity is stored in Parameters with the Entity name, and the user code performs the same process to the same, thus being applicable to both order insertion and update.
Fig. 2 is a database form change notification apparatus 200 according to an embodiment of the present invention, where the apparatus 200 includes:
an adding unit 201, configured to add an event for uniformly receiving and forwarding the change notification and an attribute for marking a method of the functional interface to the service interface engineering of the database code;
a checking unit 202 for checking by the code generator whether the method of each functional interface in the event handler contains the attribute;
an adding unit 203, configured to automatically add, if the attribute is included, a code for delivering a change notification parameter after the corresponding method;
and the triggering unit 204 is configured to execute the method when the database form is changed, trigger a change notification, and transmit the change notification to the event, and forward the event.
In one embodiment, the attributes include: a first attribute for marking on a method of a functional interface and a second attribute for marking on a parameter of a method of a functional interface.
In one embodiment, the initiating unit 204 includes:
a first transfer unit, configured to transfer, to the event, a parameter of a change notification, where the parameter of the change notification includes: the name of the change notification, the name of the parameter table and the database instance.
In an embodiment, the parameters of the change notification further include: one or more of a return value of the method, a transaction token, and a context token.
In an embodiment, the first attribute includes: the name of the change notification, the parameter table to be included, whether the return value needs to be included, and whether the return value needs to be recorded as a parameter; the second attribute includes: the parameters contained in the parameter table and the aliases specified by the parameters are required.
In one embodiment, the method of the functional interface includes: database form insertion and database form updating.
In one embodiment, the initiating unit 204 further comprises:
and the second transfer unit is used for transferring the change notification caused by the bottom layer code to the upper layer code layer by layer and finally transferring the change notification to the event.
Since the embodiments of the apparatus portion and the embodiments of the method portion correspond to each other, the embodiments of the apparatus portion are referred to the description of the embodiments of the method portion, and are not repeated herein.
The embodiment of the present invention also provides a computer readable storage medium having a computer program stored thereon, which when executed can implement the steps provided in the above embodiment. The storage medium may include: a U-disk, a removable hard disk, a Read-only memory (ROM), a random access memory (RandomAccess Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The embodiment of the invention also provides a computer device, which can comprise a memory and a processor, wherein the memory stores a computer program, and the processor can realize the steps provided by the embodiment when calling the computer program in the memory. Of course, the electronic device may also include various network interfaces, power supplies, and the like.
In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section. It should be noted that it would be obvious to those skilled in the art that various improvements and modifications can be made to the present application without departing from the principles of the present application, and such improvements and modifications fall within the scope of the claims of the present application.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Claims (5)
1. A database form change notification method, comprising:
adding an event for uniformly receiving and forwarding change notification and an attribute for marking a method of a functional interface to service interface engineering of a database code;
the code generator checks whether the method of each function interface in the event handler contains the attribute;
if the attribute is included, automatically adding codes for transmitting change notification parameters after the corresponding method;
when the database form is changed, executing the method, triggering a change notification, transmitting the change notification to the event, and forwarding the event;
the attributes include: a first attribute for marking on a method of the functional interface and a second attribute for marking on a parameter of the method of the functional interface; the first attribute represents that a change notification is required to be initiated after the marked method is executed; the parameter of the second attribute representation mark is required to be contained in the change notification, and an alias is assigned to the parameter;
the delivering the change notification to the event includes:
transmitting a parameter of a change notification to the event, wherein the parameter of the change notification comprises: changing the names of the notices, the parameter list and the names of the database examples;
the parameters of the change notification further include: one or more of a return value of the method, a transaction token, and a context token;
the first attribute includes: the name of the change notification, the parameter table to be included, whether the return value needs to be included, and whether the return value needs to be recorded as a parameter; the second attribute includes: parameters that need to be contained in the parameter table and aliases specified by the parameters;
said delivering said change notification to said event comprising:
and transmitting the change notification caused by the bottom layer code to the upper layer code layer by layer and finally transmitting the change notification to the event.
2. The method of claim 1, wherein the method of the function interface comprises: database form insertion and database form updating.
3. A database form change notification apparatus, comprising:
an adding unit, configured to add an event for uniformly receiving and forwarding the change notification and an attribute for marking a method of the functional interface to the service interface engineering of the database code;
a checking unit for checking whether the method of each function interface in the event handler contains the attribute by the code generator;
an adding unit, configured to automatically add a code for delivering a change notification parameter after the corresponding method if the attribute is included;
the initiation unit is used for executing the method when the database form is changed, initiating a change notification, transmitting the change notification to the event and forwarding the event;
the attributes include: a first attribute for marking on a method of the functional interface and a second attribute for marking on a parameter of the method of the functional interface; the first attribute represents that a change notification is required to be initiated after the marked method is executed; the parameter of the second attribute representation mark is required to be contained in the change notification, and an alias is assigned to the parameter;
the initiating unit comprises:
a first transfer unit, configured to transfer, to the event, a parameter of a change notification, where the parameter of the change notification includes: changing the names of the notices, the parameter list and the names of the database examples;
the parameters of the change notification further include: one or more of a return value of the method, a transaction token, and a context token;
the first attribute includes: the name of the change notification, the parameter table to be included, whether the return value needs to be included, and whether the return value needs to be recorded as a parameter; the second attribute includes: parameters that need to be contained in the parameter table and aliases specified by the parameters;
the initiating unit further comprises:
and the second transfer unit is used for transferring the change notification caused by the bottom layer code to the upper layer code layer by layer and finally transferring the change notification to the event.
4. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the database form change notification method of any of claims 1 to 2 when the computer program is executed.
5. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, which when executed by a processor implements the database form change notification method according to any of claims 1 to 2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010151722.2A CN111367932B (en) | 2020-03-06 | 2020-03-06 | Database form change notification method, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010151722.2A CN111367932B (en) | 2020-03-06 | 2020-03-06 | Database form change notification method, device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111367932A CN111367932A (en) | 2020-07-03 |
CN111367932B true CN111367932B (en) | 2023-05-12 |
Family
ID=71206730
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010151722.2A Active CN111367932B (en) | 2020-03-06 | 2020-03-06 | Database form change notification method, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111367932B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112579682B (en) * | 2020-12-24 | 2023-10-10 | 中国农业银行股份有限公司 | Method and device for notifying change of data model, electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1673972A (en) * | 2004-08-04 | 2005-09-28 | 上海宝信软件股份有限公司 | Dynamic monitoring system and method for data base list update |
CN105677774A (en) * | 2015-12-30 | 2016-06-15 | 百度在线网络技术(北京)有限公司 | Data event pushing method and device |
CN110096518A (en) * | 2019-04-04 | 2019-08-06 | 华东理工大学 | Knowledge base metadata sending method and device, readable storage medium storing program for executing |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040015809A1 (en) * | 2001-05-18 | 2004-01-22 | Doreen Yining Cheng | Code generation for integrating devices into a middleware framework |
US8848210B2 (en) * | 2012-01-30 | 2014-09-30 | Kyocera Document Solutions Inc. | Event notification system in which a terminal is notified of events generated in devices via a network |
EP2897056A4 (en) * | 2012-10-09 | 2015-09-16 | Huawei Tech Co Ltd | Method and system for making web application obtain database change |
CN103744651A (en) * | 2013-12-20 | 2014-04-23 | 柳州职业技术学院 | Method for automatically generating business processing model oriented to business requirements |
US9916137B2 (en) * | 2014-06-25 | 2018-03-13 | Oracle International Corporation | Rest service source code generation |
CN109408043B (en) * | 2018-10-19 | 2021-10-22 | 中国银行股份有限公司 | Program generation method and device |
CN110286897A (en) * | 2019-05-22 | 2019-09-27 | 深圳壹账通智能科技有限公司 | API Visual Dynamic configuration method, device, equipment and storage medium |
CN110531971B (en) * | 2019-08-29 | 2023-01-03 | 深圳市今天国际物流技术股份有限公司 | Automatic generation method and device of access code, computer equipment and storage medium |
-
2020
- 2020-03-06 CN CN202010151722.2A patent/CN111367932B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1673972A (en) * | 2004-08-04 | 2005-09-28 | 上海宝信软件股份有限公司 | Dynamic monitoring system and method for data base list update |
CN105677774A (en) * | 2015-12-30 | 2016-06-15 | 百度在线网络技术(北京)有限公司 | Data event pushing method and device |
CN110096518A (en) * | 2019-04-04 | 2019-08-06 | 华东理工大学 | Knowledge base metadata sending method and device, readable storage medium storing program for executing |
Also Published As
Publication number | Publication date |
---|---|
CN111367932A (en) | 2020-07-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109493076B (en) | Kafka message unique consumption method, system, server and storage medium | |
KR100210208B1 (en) | Method and apparatus for enabling persistent attributes in an object oriented environment | |
AU2008350306B2 (en) | Targeted queries using an OMA DM protocol | |
CN106059825A (en) | Distributed system and configuration method | |
CN107992537B (en) | Service attribute transmission method, device, computer equipment and storage medium | |
CN110719311B (en) | Distributed coordination service method, system and computer readable storage medium | |
KR101545626B1 (en) | System for interoperation between dds and dbms | |
CN113032419A (en) | Multi-source data aggregation search method, device, equipment and storage medium | |
CN111460038A (en) | Quasi-real-time data synchronization method and device | |
CN111367932B (en) | Database form change notification method, device, computer equipment and storage medium | |
CN103561083A (en) | Internet of things data processing method | |
CN114827171B (en) | Information synchronization method, apparatus, computer device and storage medium | |
CN104714923A (en) | Method and device for achieving equipment sharing | |
KR100747466B1 (en) | A device management client and device management method using nodes having additional properties | |
CN112000971B (en) | File permission recording method, system and related device | |
CN117435569A (en) | Dynamic capacity expansion method, device, equipment, medium and program product for cache system | |
CN112019452A (en) | Method, system and related device for processing service requirement | |
CN107368376B (en) | Message sending method and device, expansion method and terminal | |
CN116860776A (en) | Label updating method, device, equipment and medium | |
US11301538B1 (en) | Data management in multi-application web pages | |
CN116488986A (en) | Event-driven message touch method, system and device and storage medium | |
CN112615786A (en) | Route determining method and device, electronic equipment and computer readable storage medium | |
CN115134217B (en) | Data processing method, device, equipment and storage medium | |
CN111400060A (en) | Equipment linkage method, device, server and medium | |
CN110944047A (en) | Distributed application monitoring method and device |
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 |