- All Known Subinterfaces:
public interface ResultSetProviderAn implementation of this interface is returned from functions and procedures that are declared to return
SET OFa complex type. This interface is appropriate when the function will be generating the returned set on the fly; if it will have a
ResultSetobtained from a query, it should just return
ResultSetHandleinstead. Functions that return
SET OFa simple type should simply return an
For a function declared to return
SETOF RECORDrather than a specific complex type known in advance, the
assignRowValuescan be queried to learn the number, names, and types of columns expected by the caller.
- Thomas Hallgren
Nested Class Summary
Nested Classes Modifier and Type Interface Description
assignRowValuesmethod accepting a
longrow count must be implemented, and the
intversion defaults to using it.
Modifier and Type Method Description
assignRowValues(ResultSet receiver, int currentRow)Older version where currentRow is limited to the range of
assignRowValues(ResultSet receiver, long currentRow)This method is called once for each row that should be returned from a procedure that returns a set of rows.
close()Called after the last row has returned or when the query evaluator decides that it does not need any more rows.
default boolean assignRowValues(ResultSet receiver, long currentRow) throws SQLExceptionThis method is called once for each row that should be returned from a procedure that returns a set of rows. The receiver is a
SingleRowWriterinstance that is used to capture the data for the row.
If the return type is
RECORDrather than a specific complex type, SQL requires a column definition list to follow any use of the function in a query. The
receivercan be used here to learn the number, names, and types of the columns expected by the caller. (It can also be used in the case of a specific complex type, but in that case the names and types are probably already known.)
This default implementation calls
assignRowValues(ResultSet,int), or throws an
SQLExceptionwith SQLState 54000 (program limit exceeded) if the row number exceeds
receiver- Receiver of values for the given row.
currentRow- Row number, zero on the first call, incremented by one on each subsequent call.
trueif a new row was provided,
falseif not (end of data).
boolean assignRowValues(ResultSet receiver, int currentRow) throws SQLExceptionOlder version where currentRow is limited to the range of