Class MergedResultSet

java.lang.Object
org.dellroad.stuff.sql.MergedResultSet
All Implemented Interfaces:
AutoCloseable, ResultSet, Wrapper

public class MergedResultSet extends Object implements ResultSet
Merges multiple ResultSets into a single ResultSet. The merge is performed in an online fashion and supports preserving sort order for sorted ResultSets.

The given ResultSets must have the same column geometry. If the ResultSets are sorted, then in order to preserve that sorting the ResultSets must be sorted on the same columns, and the sort columns and corresponding sort orderings must be provided to the appropriate constructor.

This class provides a ResultSet of type ResultSet.TYPE_FORWARD_ONLY and concurrency mode ResultSet.CONCUR_READ_ONLY. Non-row specific information, such as is returned by getMetaData(), getStatement(), getFetchSize(), getHoldability(), and findColumn() is derived from the first ResultSet provided.