The mi_fp_setisdone() function
The mi_fp_setisdone() accessor function sets the iterator-completion flag for an iterator function in its associated MI_FPARAM structure.
Syntax
void mi_fp_setisdone(fparam_ptr, flag)
MI_FPARAM *fparam_ptr;
mi_integer flag;
- fparam_ptr
- A pointer to the associated MI_FPARAM structure.
- flag
- The integer iterator-completion flag to store in the MI_FPARAM structure, which indicates whether the end condition for the iterator function was reached.
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
Yes | Yes |
Usage
Use the mi_fp_setisdone() function to tell the database server whether the current iterator function has reached its end condition. An end condition indicates that the generation of the active set is complete. The database server calls the iterator function with the SET_RETONE iterator-status value as long as the end condition has not been set.
Valid value | Meaning | Description |
---|---|---|
1 | The end condition was reached. | Once iterations are complete, the database server calls the iterator function one final time, with the iterator status of SET_END. |
0 | The end condition has not been reached. | The database server sets the iterator status to SET_RETONE and continues to call the iterator function. |
The
iterator function does not return a value into the active set once
the iterator-completion flag is set to 1
.
For more information about how to create and call iterator functions, see the HCL OneDB™ DataBlade® API Programmer's Guide.
Return values
None.