Package org.h2.tools

Class SimpleResultSet

java.lang.Object
org.h2.tools.SimpleResultSet
All Implemented Interfaces:
AutoCloseable, ResultSet, ResultSetMetaData, Wrapper

public class SimpleResultSet extends Object implements ResultSet, ResultSetMetaData
This class is a simple result set and meta data implementation. It can be used in Java functions that return a result set. Only the most basic methods are implemented, the others throw an exception. This implementation is standalone, and only relies on standard classes. It can be extended easily if required. An application can create a result set using the following code:
 SimpleResultSet rs = new SimpleResultSet();
 rs.addColumn("ID", Types.INTEGER, 10, 0);
 rs.addColumn("NAME", Types.VARCHAR, 255, 0);
 rs.addRow(0, "Hello" });
 rs.addRow(1, "World" });