|
The mi_save_set_get_last() function retrieves the final element from the specified save set.
| save_set | is a pointer to an MI_SAVE_SET structure whose last row is returned. |
| error | is a pointer to a return code. |
The mi_save_set_get_last() function obtains the last row from the save set that save_set references. Because the DataBlade API maintains a save set as an FIFO (first-in, first-out) queue, the last row is the first row added to the save set; that is, it is the row at the bottom of the queue. This save set must have been previously created with mi_save_set_create().
When the mi_save_set_get_last() function is successful, it returns a pointer to the row structure for the last row. It also move the cursor position to point to this new current row of the save set. If mi_save_set_get_last() cannot find the last row, the function takes the following steps:
| MI_ROW * | is a pointer to the final row in the specified save set. |
| NULL | indicates that the function was not successful or the function cannot find the last row. |
Upon failure, mi_save_set_get_last() returns NULL and sets *error to MI_ERROR.
See the descriptions of the following functions: mi_save_set_count(), mi_save_set_create(), mi_save_set_delete(), mi_save_set_destroy(), mi_save_set_get_first(), mi_save_set_get_next(), mi_save_set_get_previous(), and mi_save_set_insert().