Debian Codegraph @

src/main/org/h2/tools/SimpleRowSource.java

raw
1 /*
2 * Copyright 2004-2023 H2 Group. Multiple-Licensed under the MPL 2.0,
3 * and the EPL 1.0 (https://h2database.com/html/license.html).
4 * Initial Developer: H2 Group
5 */
6 package org.h2.tools;
7
8 import java.sql.SQLException;
9
10 /**
11 * This interface is for classes that create rows on demand.
12 * It is used together with SimpleResultSet to create a dynamic result set.
13 */
14 public interface SimpleRowSource {
15
16 /**
17 * Get the next row. Must return null if no more rows are available.
18 *
19 * @return the row or null
20 * @throws SQLException on failure
21 */
22 Object[] readRow() throws SQLException;
23
24 /**
25 * Close the row source.
26 */
27 void close();
28
29 /**
30 * Reset the position (before the first row).
31 *
32 * @throws SQLException if this operation is not supported
33 */
34 void reset() throws SQLException;
35 }