The mi_trigger_get_new_row() function

The mi_trigger_get_new_row() function returns the name of the new row value if the MI_TRIGGER_FOREACH_EVENT bit is set, which implies that neither the MI_TRIGGER_BEFORE_EVENT nor the MI_TRIGGER_AFTER_EVENT bits are set.

Syntax

MI_ROW *mi_trigger_get_new_row(void)
Valid in client LIBMI application? Valid in user-defined routine?
No Yes

Usage

For an INSERT or UPDATE statement, the mi_trigger_get_new_row()function returns the new row being inserted or the updated value of the row. It returns NULL when called in other trigger action statements. 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

An MI_ROW pointer
A pointer to the new row.
NULL
The function was one of the following:
  • not successful.
  • not in the trigger action.
  • not in the FOR EACH row trigger.
  • not in one of the INSERT or UPDATE triggers.