ITERATOR

Use the ITERATOR modifier with external functions to specify that the function is an iterator function. An iterator function is a function that returns a single element per function call to return a set of data; that is, it is called with an initial call and zero or more subsequent calls until the set is complete.

By default, an external C or Java™ language function is not an iterator function.

An SPL iterator function requires the RETURN WITH RESUME statement, rather than the ITERATOR modifier.

In ESQL/C, an iterator function requires a cursor. The cursor allows the client application to retrieve the values one at a time with the FETCH statement.

For more information on how to write iterator functions, see HCL OneDB™ User-Defined Routines and Data Types Developer's Guide and the HCL OneDB DataBlade® API Programmer's Guide.

For information about using an iterator function with a virtual table interface in the FROM clause of a query, see Iterator Functions.