The mi_trigger_event() function
The mi_trigger_event() function returns the trigger event information for the current trigger event.
Syntax
mi_integer mi_trigger_event(void)
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
No | Yes |
Usage
The mi_trigger_event() function returns the value derived from an OR operation from the following events. These values are defined in the public header file. Each bit set in the returned value indicates the type of the trigger currently executing. The returned value is combined with these values to determine the current event. This function can be called in SPL trigger functions and trigger procedures only within the triggered action list of the FOR EACH ROW clause in trigger definitions.
Return values
- MI_ERROR
- The function was not successful
- MI_TRIGGER_NOT_IN_EVENT
- The UDR is not currently executing.
- MI_TRIGGER_INSERT_EVENT
- An INSERT trigger event.
- MI_TRIGGER_DELETE_EVENT
- A DELETE trigger event.
- MI_TRIGGER_UPDATE_EVENT
- An UPDATE trigger event.
- MI_TRIGGER_SELECT_EVENT
- A SELECT trigger event.
- MI_TRIGGER_BEFORE_EVENT
- A BEFORE trigger event.
- MI_TRIGGER_AFTER_EVENT
- An AFTER trigger event.
- MI_TRIGGER_FOREACH_EVENT
- A FOREACH trigger event.
- MI_TRIGGER_INSTEAD_EVENT
- An INSTEAD OF trigger event. (INSERT,DELETE,UPDATE operations through view)
- MI_TRIGGER_REMOTE_EVENT
- A remote trigger event.