- java.lang.Object
-
- org.postgresql.pljava.internal.ResultSetPicker
-
- All Implemented Interfaces:
ResultSetProvider
,ResultSetProvider.Large
public class ResultSetPicker extends Object implements ResultSetProvider.Large
An adapter class used internally when a set-returning user function returns aResultSetHandle
, presenting it as aResultSetProvider
instead.Note on the current implementation: this class operates by fetching every field of every row of the result set as a Java object via the one-argument
getObject
, then storing it into the writable result set supplied by PL/Java. Apart from being rather inefficient, this can involve conversions through legacy types (such asjava.sql.Timestamp
when the JSR 310java.time
conversions are better specified). In cases where that isn't acceptable, the user function should be declared to returnResultSetProvider
and do this work itself.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.postgresql.pljava.ResultSetProvider
ResultSetProvider.Large
-
-
Constructor Summary
Constructors Constructor Description ResultSetPicker(ResultSetHandle resultSetHandle)
-
Method Summary
Modifier and Type Method Description boolean
assignRowValues(ResultSet receiver, long currentRow)
void
close()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.postgresql.pljava.ResultSetProvider.Large
assignRowValues
-
-
-
-
Constructor Detail
-
ResultSetPicker
public ResultSetPicker(ResultSetHandle resultSetHandle) throws SQLException
- Throws:
SQLException
-
-
Method Detail
-
assignRowValues
public boolean assignRowValues(ResultSet receiver, long currentRow) throws SQLException
- Specified by:
assignRowValues
in interfaceResultSetProvider
- Specified by:
assignRowValues
in interfaceResultSetProvider.Large
- Throws:
SQLException
-
close
public void close() throws SQLException
- Specified by:
close
in interfaceResultSetProvider
- Throws:
SQLException
-
-