Save sets provide a mechanism for a DataBlade API module to access several rows simultaneously. When a DataBlade API module retrieves rows from a cursor in an mi_next_row( ) loop, only one row is current at a time. Each iteration of mi_next_row( ) overwrites the row from the previous iteration. If your DataBlade API module needs to perform comparisons or other types of processing on more than one row, you can save the rows in a save set. The DataBlade API maintains a save set as a FIFO (first-in, first-out) queue.
The DataBlade API provides the save-set structure, MI_SAVE_SET, to hold the rows of a save set. The following table summarizes the memory operations for a save-set structure.
Memory Duration | Memory Operation | Function Name |
---|---|---|
PER_STMT_EXEC | Constructor | mi_save_set_create( ) |
Destructor | mi_save_set_destroy( ) |
Table 60 lists the functions that the DataBlade API provides for use with a save set.