A Generator operator produces a result set without input.
Like an Iterator, a Generator lets you specify JavaScript expressions for initializing variables, updating variables, and testing for termination. Unlike an Iterator, a Generator does not accept inputs. Like a Projection operator, a Generator allows you to specify the names and types of the output columns, as well as JavaScript expressions for computing the values in each row.
When a Generator is first called, it executes the Initialize expression you supply to initialize variables. On each call, Generator follows this sequence:
Tests the termination condition.
If the termination condition has not been met, it generates a row with the designated schema by executing all of the user-specified JavaScript expressions.
Executes the Increment expression you supply to update variables.
The output of the Generator is the sequence of rows created in these iterations.
For product-related issues, contact Sybase Technical Support at 1-800-8SYBASE. Send your feedback on this help topic directly to Sybase Technical Publications: pubs@sybase.com