Package org.h2.jdbc

Class JdbcResultSet

java.lang.Object
org.h2.message.TraceObject
org.h2.jdbc.JdbcResultSet
All Implemented Interfaces:
AutoCloseable, ResultSet, Wrapper

public final class JdbcResultSet extends TraceObject implements ResultSet
Represents a result set.

Column labels are case-insensitive, quotes are not supported. The first column has the column index 1.

Thread safety: the result set is not thread-safe and must not be used by multiple threads concurrently.

Updatable result sets: Result sets are updatable when the result only contains columns from one table, and if it contains all columns of a unique index (primary key or other) of this table. Key columns may not contain NULL (because multiple rows with NULL could exist). In updatable result sets, own changes are visible, but not own inserts and deletes.

  • Field Details

    • scrollable

      private final boolean scrollable
    • updatable

      private final boolean updatable
    • triggerUpdatable

      private final boolean triggerUpdatable
    • result

    • conn

      private JdbcConnection conn
    • stat

      private JdbcStatement stat
    • columnCount

      private int columnCount
    • wasNull

      private boolean wasNull
    • insertRow

      private Value[] insertRow
    • updateRow

      private Value[] updateRow
    • columnLabelMap

      private HashMap<String,Integer> columnLabelMap
    • patchedRows

      private HashMap<Long,Value[]> patchedRows
    • preparedStatement

      private JdbcPreparedStatement preparedStatement
    • command

      private final CommandInterface command
  • Constructor Details

  • Method Details

    • next

      public boolean next() throws SQLException
      Moves the cursor to the next row of the result set.
      Specified by:
      next in interface ResultSet
      Returns:
      true if successful, false if there are no more rows
      Throws:
      SQLException
    • getMetaData

      public ResultSetMetaData getMetaData() throws SQLException
      Gets the meta data of this result set.
      Specified by:
      getMetaData in interface ResultSet
      Returns:
      the meta data
      Throws:
      SQLException
    • wasNull

      public boolean wasNull() throws SQLException
      Returns whether the last column accessed was null.
      Specified by:
      wasNull in interface ResultSet
      Returns:
      true if the last column accessed was null
      Throws:
      SQLException
    • findColumn

      public int findColumn(String columnLabel) throws SQLException
      Searches for a specific column in the result set. A case-insensitive search is made.
      Specified by:
      findColumn in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the column index (1,2,...)
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • close

      public void close() throws SQLException
      Closes the result set.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface ResultSet
      Throws:
      SQLException
    • closeInternal

      void closeInternal(boolean fromStatement)
      Close the result set. This method also closes the statement if required.
      Parameters:
      fromStatement - if true - close statement in the end
    • getStatement

      public Statement getStatement() throws SQLException
      Returns the statement that created this object.
      Specified by:
      getStatement in interface ResultSet
      Returns:
      the statement or prepared statement, or null if created by a DatabaseMetaData call.
      Throws:
      SQLException
    • getWarnings

      public SQLWarning getWarnings() throws SQLException
      Gets the first warning reported by calls on this object.
      Specified by:
      getWarnings in interface ResultSet
      Returns:
      null
      Throws:
      SQLException
    • clearWarnings

      public void clearWarnings() throws SQLException
      Clears all warnings.
      Specified by:
      clearWarnings in interface ResultSet
      Throws:
      SQLException
    • getString

      public String getString(int columnIndex) throws SQLException
      Returns the value of the specified column as a String.
      Specified by:
      getString in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getString

      public String getString(String columnLabel) throws SQLException
      Returns the value of the specified column as a String.
      Specified by:
      getString in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getInt

      public int getInt(int columnIndex) throws SQLException
      Returns the value of the specified column as an int.
      Specified by:
      getInt in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getInt

      public int getInt(String columnLabel) throws SQLException
      Returns the value of the specified column as an int.
      Specified by:
      getInt in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getIntInternal

      private int getIntInternal(int columnIndex)
    • getBigDecimal

      public BigDecimal getBigDecimal(int columnIndex) throws SQLException
      Returns the value of the specified column as a BigDecimal.
      Specified by:
      getBigDecimal in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getDate

      public Date getDate(int columnIndex) throws SQLException
      Returns the value of the specified column as a java.sql.Date.

      Usage of this method is discouraged. Use getObject(columnIndex, LocalDate.class) instead.

      Specified by:
      getDate in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
      See Also:
    • getTime

      public Time getTime(int columnIndex) throws SQLException
      Returns the value of the specified column as a java.sql.Time.

      Usage of this method is discouraged. Use getObject(columnIndex, LocalTime.class) instead.

      Specified by:
      getTime in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
      See Also:
    • getTimestamp

      public Timestamp getTimestamp(int columnIndex) throws SQLException
      Returns the value of the specified column as a java.sql.Timestamp.

      Usage of this method is discouraged. Use getObject(columnIndex, LocalDateTime.class) instead.

      Specified by:
      getTimestamp in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
      See Also:
    • getBigDecimal

      public BigDecimal getBigDecimal(String columnLabel) throws SQLException
      Returns the value of the specified column as a BigDecimal.
      Specified by:
      getBigDecimal in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getDate

      public Date getDate(String columnLabel) throws SQLException
      Returns the value of the specified column as a java.sql.Date.

      Usage of this method is discouraged. Use getObject(columnLabel, LocalDate.class) instead.

      Specified by:
      getDate in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
      See Also:
    • getTime

      public Time getTime(String columnLabel) throws SQLException
      Returns the value of the specified column as a java.sql.Time.

      Usage of this method is discouraged. Use getObject(columnLabel, LocalTime.class) instead.

      Specified by:
      getTime in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
      See Also:
    • getTimestamp

      public Timestamp getTimestamp(String columnLabel) throws SQLException
      Returns the value of the specified column as a java.sql.Timestamp.

      Usage of this method is discouraged. Use getObject(columnLabel, LocalDateTime.class) instead.

      Specified by:
      getTimestamp in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
      See Also:
    • getObject

      public Object getObject(int columnIndex) throws SQLException
      Returns a column value as a Java object. The data is de-serialized into a Java object (on the client side).
      Specified by:
      getObject in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value or null
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getObject

      public Object getObject(String columnLabel) throws SQLException
      Returns a column value as a Java object. The data is de-serialized into a Java object (on the client side).
      Specified by:
      getObject in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value or null
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getBoolean

      public boolean getBoolean(int columnIndex) throws SQLException
      Returns the value of the specified column as a boolean.
      Specified by:
      getBoolean in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getBoolean

      public boolean getBoolean(String columnLabel) throws SQLException
      Returns the value of the specified column as a boolean.
      Specified by:
      getBoolean in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getBooleanInternal

      private boolean getBooleanInternal(int columnIndex)
    • getByte

      public byte getByte(int columnIndex) throws SQLException
      Returns the value of the specified column as a byte.
      Specified by:
      getByte in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getByte

      public byte getByte(String columnLabel) throws SQLException
      Returns the value of the specified column as a byte.
      Specified by:
      getByte in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getByteInternal

      private byte getByteInternal(int columnIndex)
    • getShort

      public short getShort(int columnIndex) throws SQLException
      Returns the value of the specified column as a short.
      Specified by:
      getShort in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getShort

      public short getShort(String columnLabel) throws SQLException
      Returns the value of the specified column as a short.
      Specified by:
      getShort in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getShortInternal

      private short getShortInternal(int columnIndex)
    • getLong

      public long getLong(int columnIndex) throws SQLException
      Returns the value of the specified column as a long.
      Specified by:
      getLong in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getLong

      public long getLong(String columnLabel) throws SQLException
      Returns the value of the specified column as a long.
      Specified by:
      getLong in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getLongInternal

      private long getLongInternal(int columnIndex)
    • getFloat

      public float getFloat(int columnIndex) throws SQLException
      Returns the value of the specified column as a float.
      Specified by:
      getFloat in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getFloat

      public float getFloat(String columnLabel) throws SQLException
      Returns the value of the specified column as a float.
      Specified by:
      getFloat in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getFloatInternal

      private float getFloatInternal(int columnIndex)
    • getDouble

      public double getDouble(int columnIndex) throws SQLException
      Returns the value of the specified column as a double.
      Specified by:
      getDouble in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getDouble

      public double getDouble(String columnLabel) throws SQLException
      Returns the value of the specified column as a double.
      Specified by:
      getDouble in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getDoubleInternal

      private double getDoubleInternal(int columnIndex)
    • getBigDecimal

      @Deprecated public BigDecimal getBigDecimal(String columnLabel, int scale) throws SQLException
      Deprecated.
      Returns the value of the specified column as a BigDecimal.
      Specified by:
      getBigDecimal in interface ResultSet
      Parameters:
      columnLabel - the column label
      scale - the scale of the returned value
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getBigDecimal

      @Deprecated public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException
      Deprecated.
      Returns the value of the specified column as a BigDecimal.
      Specified by:
      getBigDecimal in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      scale - the scale of the returned value
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getUnicodeStream

      @Deprecated public InputStream getUnicodeStream(int columnIndex) throws SQLException
      Deprecated.
      since JDBC 2.0, use getCharacterStream
      [Not supported]
      Specified by:
      getUnicodeStream in interface ResultSet
      Throws:
      SQLException
    • getUnicodeStream

      @Deprecated public InputStream getUnicodeStream(String columnLabel) throws SQLException
      Deprecated.
      since JDBC 2.0, use setCharacterStream
      [Not supported]
      Specified by:
      getUnicodeStream in interface ResultSet
      Throws:
      SQLException
    • getObject

      public Object getObject(int columnIndex, Map<String,Class<?>> map) throws SQLException
      [Not supported] Gets a column as a object using the specified type mapping.
      Specified by:
      getObject in interface ResultSet
      Throws:
      SQLException
    • getObject

      public Object getObject(String columnLabel, Map<String,Class<?>> map) throws SQLException
      [Not supported] Gets a column as a object using the specified type mapping.
      Specified by:
      getObject in interface ResultSet
      Throws:
      SQLException
    • getRef

      public Ref getRef(int columnIndex) throws SQLException
      [Not supported] Gets a column as a reference.
      Specified by:
      getRef in interface ResultSet
      Throws:
      SQLException
    • getRef

      public Ref getRef(String columnLabel) throws SQLException
      [Not supported] Gets a column as a reference.
      Specified by:
      getRef in interface ResultSet
      Throws:
      SQLException
    • getDate

      public Date getDate(int columnIndex, Calendar calendar) throws SQLException
      Returns the value of the specified column as a java.sql.Date using a specified time zone.

      Usage of this method is discouraged. Use getObject(columnIndex, LocalDate.class) instead.

      Specified by:
      getDate in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      calendar - the calendar
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
      See Also:
    • getDate

      public Date getDate(String columnLabel, Calendar calendar) throws SQLException
      Returns the value of the specified column as a java.sql.Date using a specified time zone.

      Usage of this method is discouraged. Use getObject(columnLabel, LocalDate.class) instead.

      Specified by:
      getDate in interface ResultSet
      Parameters:
      columnLabel - the column label
      calendar - the calendar
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
      See Also:
    • getTime

      public Time getTime(int columnIndex, Calendar calendar) throws SQLException
      Returns the value of the specified column as a java.sql.Time using a specified time zone.

      Usage of this method is discouraged. Use getObject(columnIndex, LocalTime.class) instead.

      Specified by:
      getTime in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      calendar - the calendar
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
      See Also:
    • getTime

      public Time getTime(String columnLabel, Calendar calendar) throws SQLException
      Returns the value of the specified column as a java.sql.Time using a specified time zone.

      Usage of this method is discouraged. Use getObject(columnLabel, LocalTime.class) instead.

      Specified by:
      getTime in interface ResultSet
      Parameters:
      columnLabel - the column label
      calendar - the calendar
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
      See Also:
    • getTimestamp

      public Timestamp getTimestamp(int columnIndex, Calendar calendar) throws SQLException
      Returns the value of the specified column as a java.sql.Timestamp using a specified time zone.

      Usage of this method is discouraged. Use getObject(columnIndex, LocalDateTime.class) instead.

      Specified by:
      getTimestamp in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      calendar - the calendar
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
      See Also:
    • getTimestamp

      public Timestamp getTimestamp(String columnLabel, Calendar calendar) throws SQLException
      Returns the value of the specified column as a java.sql.Timestamp.

      Usage of this method is discouraged. Use getObject(columnLabel, LocalDateTime.class) instead.

      Specified by:
      getTimestamp in interface ResultSet
      Parameters:
      columnLabel - the column label
      calendar - the calendar
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
      See Also:
    • getBlob

      public Blob getBlob(int columnIndex) throws SQLException
      Returns the value of the specified column as a Blob.
      Specified by:
      getBlob in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getBlob

      public Blob getBlob(String columnLabel) throws SQLException
      Returns the value of the specified column as a Blob.
      Specified by:
      getBlob in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getBlob

      private JdbcBlob getBlob(int id, int columnIndex)
    • getBytes

      public byte[] getBytes(int columnIndex) throws SQLException
      Returns the value of the specified column as a byte array.
      Specified by:
      getBytes in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getBytes

      public byte[] getBytes(String columnLabel) throws SQLException
      Returns the value of the specified column as a byte array.
      Specified by:
      getBytes in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getBinaryStream

      public InputStream getBinaryStream(int columnIndex) throws SQLException
      Returns the value of the specified column as an input stream.
      Specified by:
      getBinaryStream in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getBinaryStream

      public InputStream getBinaryStream(String columnLabel) throws SQLException
      Returns the value of the specified column as an input stream.
      Specified by:
      getBinaryStream in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getClob

      public Clob getClob(int columnIndex) throws SQLException
      Returns the value of the specified column as a Clob.
      Specified by:
      getClob in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getClob

      public Clob getClob(String columnLabel) throws SQLException
      Returns the value of the specified column as a Clob.
      Specified by:
      getClob in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getArray

      public Array getArray(int columnIndex) throws SQLException
      Returns the value of the specified column as an Array.
      Specified by:
      getArray in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getArray

      public Array getArray(String columnLabel) throws SQLException
      Returns the value of the specified column as an Array.
      Specified by:
      getArray in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getArray

      private Array getArray(int id, int columnIndex)
    • getAsciiStream

      public InputStream getAsciiStream(int columnIndex) throws SQLException
      Returns the value of the specified column as an input stream.
      Specified by:
      getAsciiStream in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getAsciiStream

      public InputStream getAsciiStream(String columnLabel) throws SQLException
      Returns the value of the specified column as an input stream.
      Specified by:
      getAsciiStream in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getCharacterStream

      public Reader getCharacterStream(int columnIndex) throws SQLException
      Returns the value of the specified column as a reader.
      Specified by:
      getCharacterStream in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getCharacterStream

      public Reader getCharacterStream(String columnLabel) throws SQLException
      Returns the value of the specified column as a reader.
      Specified by:
      getCharacterStream in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getURL

      public URL getURL(int columnIndex) throws SQLException
      [Not supported]
      Specified by:
      getURL in interface ResultSet
      Throws:
      SQLException
    • getURL

      public URL getURL(String columnLabel) throws SQLException
      [Not supported]
      Specified by:
      getURL in interface ResultSet
      Throws:
      SQLException
    • updateNull

      public void updateNull(int columnIndex) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateNull in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateNull

      public void updateNull(String columnLabel) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateNull in interface ResultSet
      Parameters:
      columnLabel - the column label
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateBoolean

      public void updateBoolean(int columnIndex, boolean x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateBoolean in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateBoolean

      public void updateBoolean(String columnLabel, boolean x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateBoolean in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if result set is closed or not updatable
    • updateByte

      public void updateByte(int columnIndex, byte x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateByte in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateByte

      public void updateByte(String columnLabel, byte x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateByte in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateBytes

      public void updateBytes(int columnIndex, byte[] x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateBytes in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateBytes

      public void updateBytes(String columnLabel, byte[] x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateBytes in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateShort

      public void updateShort(int columnIndex, short x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateShort in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateShort

      public void updateShort(String columnLabel, short x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateShort in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateInt

      public void updateInt(int columnIndex, int x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateInt in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateInt

      public void updateInt(String columnLabel, int x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateInt in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateLong

      public void updateLong(int columnIndex, long x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateLong in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateLong

      public void updateLong(String columnLabel, long x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateLong in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateFloat

      public void updateFloat(int columnIndex, float x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateFloat in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateFloat

      public void updateFloat(String columnLabel, float x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateFloat in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateDouble

      public void updateDouble(int columnIndex, double x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateDouble in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateDouble

      public void updateDouble(String columnLabel, double x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateDouble in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateBigDecimal

      public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateBigDecimal in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateBigDecimal

      public void updateBigDecimal(String columnLabel, BigDecimal x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateBigDecimal in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateString

      public void updateString(int columnIndex, String x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateString in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateString

      public void updateString(String columnLabel, String x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateString in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateDate

      public void updateDate(int columnIndex, Date x) throws SQLException
      Updates a column in the current or insert row.

      Usage of this method is discouraged. Use updateObject(columnIndex, value) with LocalDate parameter instead.

      Specified by:
      updateDate in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
      See Also:
    • updateDate

      public void updateDate(String columnLabel, Date x) throws SQLException
      Updates a column in the current or insert row.

      Usage of this method is discouraged. Use updateObject(columnLabel, value) with LocalDate parameter instead.

      Specified by:
      updateDate in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
      See Also:
    • updateTime

      public void updateTime(int columnIndex, Time x) throws SQLException
      Updates a column in the current or insert row.

      Usage of this method is discouraged. Use updateObject(columnIndex, value) with LocalTime parameter instead.

      Specified by:
      updateTime in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
      See Also:
    • updateTime

      public void updateTime(String columnLabel, Time x) throws SQLException
      Updates a column in the current or insert row.

      Usage of this method is discouraged. Use updateObject(columnLabel, value) with LocalTime parameter instead.

      Specified by:
      updateTime in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
      See Also:
    • updateTimestamp

      public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException
      Updates a column in the current or insert row.

      Usage of this method is discouraged. Use updateObject(columnIndex, value) with LocalDateTime parameter instead.

      Specified by:
      updateTimestamp in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
      See Also:
    • updateTimestamp

      public void updateTimestamp(String columnLabel, Timestamp x) throws SQLException
      Updates a column in the current or insert row.

      Usage of this method is discouraged. Use updateObject(columnLabel, value) with LocalDateTime parameter instead.

      Specified by:
      updateTimestamp in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
      See Also:
    • updateAsciiStream

      public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateAsciiStream in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      length - the number of characters
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateAsciiStream

      public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateAsciiStream in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateAsciiStream

      public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateAsciiStream in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      length - the number of characters
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateAsciiStream

      public void updateAsciiStream(String columnLabel, InputStream x, int length) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateAsciiStream in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      length - the number of characters
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateAsciiStream

      public void updateAsciiStream(String columnLabel, InputStream x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateAsciiStream in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed
    • updateAsciiStream

      public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateAsciiStream in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      length - the number of characters
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateAscii

      private void updateAscii(int columnIndex, InputStream x, long length)
    • updateBinaryStream

      public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateBinaryStream in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      length - the number of characters
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateBinaryStream

      public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateBinaryStream in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateBinaryStream

      public void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateBinaryStream in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      length - the number of characters
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateBinaryStream

      public void updateBinaryStream(String columnLabel, InputStream x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateBinaryStream in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateBinaryStream

      public void updateBinaryStream(String columnLabel, InputStream x, int length) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateBinaryStream in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      length - the number of characters
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateBinaryStream

      public void updateBinaryStream(String columnLabel, InputStream x, long length) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateBinaryStream in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      length - the number of characters
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateCharacterStream

      public void updateCharacterStream(int columnIndex, Reader x, long length) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateCharacterStream in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      length - the number of characters
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateCharacterStream

      public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateCharacterStream in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      length - the number of characters
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateCharacterStream

      public void updateCharacterStream(int columnIndex, Reader x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateCharacterStream in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateCharacterStream

      public void updateCharacterStream(String columnLabel, Reader x, int length) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateCharacterStream in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      length - the number of characters
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateCharacterStream

      public void updateCharacterStream(String columnLabel, Reader x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateCharacterStream in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateCharacterStream

      public void updateCharacterStream(String columnLabel, Reader x, long length) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateCharacterStream in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      length - the number of characters
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateObject

      public void updateObject(int columnIndex, Object x, int scale) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateObject in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      scale - is ignored
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateObject

      public void updateObject(String columnLabel, Object x, int scale) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateObject in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      scale - is ignored
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateObject

      public void updateObject(int columnIndex, Object x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateObject in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateObject

      public void updateObject(String columnLabel, Object x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateObject in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateObject

      public void updateObject(int columnIndex, Object x, SQLType targetSqlType) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateObject in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      targetSqlType - the SQL type
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateObject

      public void updateObject(int columnIndex, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateObject in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      targetSqlType - the SQL type
      scaleOrLength - is ignored
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateObject

      public void updateObject(String columnLabel, Object x, SQLType targetSqlType) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateObject in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      targetSqlType - the SQL type
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateObject

      public void updateObject(String columnLabel, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateObject in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      targetSqlType - the SQL type
      scaleOrLength - is ignored
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateRef

      public void updateRef(int columnIndex, Ref x) throws SQLException
      [Not supported]
      Specified by:
      updateRef in interface ResultSet
      Throws:
      SQLException
    • updateRef

      public void updateRef(String columnLabel, Ref x) throws SQLException
      [Not supported]
      Specified by:
      updateRef in interface ResultSet
      Throws:
      SQLException
    • updateBlob

      public void updateBlob(int columnIndex, InputStream x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateBlob in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateBlob

      public void updateBlob(int columnIndex, InputStream x, long length) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateBlob in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      length - the length
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateBlob

      public void updateBlob(int columnIndex, Blob x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateBlob in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateBlob

      public void updateBlob(String columnLabel, Blob x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateBlob in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateBlobImpl

      private void updateBlobImpl(int columnIndex, Blob x, long length) throws SQLException
      Throws:
      SQLException
    • updateBlob

      public void updateBlob(String columnLabel, InputStream x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateBlob in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateBlob

      public void updateBlob(String columnLabel, InputStream x, long length) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateBlob in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      length - the length
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateBlobImpl

      private void updateBlobImpl(int columnIndex, InputStream x, long length)
    • updateClob

      public void updateClob(int columnIndex, Clob x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateClob in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateClob

      public void updateClob(int columnIndex, Reader x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateClob in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateClob

      public void updateClob(int columnIndex, Reader x, long length) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateClob in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      length - the length
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateClob

      public void updateClob(String columnLabel, Clob x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateClob in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateClob

      public void updateClob(String columnLabel, Reader x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateClob in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateClob

      public void updateClob(String columnLabel, Reader x, long length) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateClob in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      length - the length
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateArray

      public void updateArray(int columnIndex, Array x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateArray in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateArray

      public void updateArray(String columnLabel, Array x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateArray in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateArrayImpl

      private void updateArrayImpl(int columnIndex, Array x) throws SQLException
      Throws:
      SQLException
    • getCursorName

      public String getCursorName() throws SQLException
      [Not supported] Gets the cursor name if it was defined. This feature is superseded by updateX methods. This method throws a SQLException because cursor names are not supported.
      Specified by:
      getCursorName in interface ResultSet
      Throws:
      SQLException
    • getRow

      public int getRow() throws SQLException
      Gets the current row number. The first row is row 1, the second 2 and so on. This method returns 0 before the first and after the last row.
      Specified by:
      getRow in interface ResultSet
      Returns:
      the row number
      Throws:
      SQLException
    • getConcurrency

      public int getConcurrency() throws SQLException
      Gets the result set concurrency. Result sets are only updatable if the statement was created with updatable concurrency, and if the result set contains all columns of the primary key or of a unique index of a table.
      Specified by:
      getConcurrency in interface ResultSet
      Returns:
      ResultSet.CONCUR_UPDATABLE if the result set is updatable, or ResultSet.CONCUR_READ_ONLY otherwise
      Throws:
      SQLException
    • getFetchDirection

      public int getFetchDirection() throws SQLException
      Gets the fetch direction.
      Specified by:
      getFetchDirection in interface ResultSet
      Returns:
      the direction: FETCH_FORWARD
      Throws:
      SQLException
    • getFetchSize

      public int getFetchSize() throws SQLException
      Gets the number of rows suggested to read in one step.
      Specified by:
      getFetchSize in interface ResultSet
      Returns:
      the current fetch size
      Throws:
      SQLException
    • setFetchSize

      public void setFetchSize(int rows) throws SQLException
      Sets the number of rows suggested to read in one step. This value cannot be higher than the maximum rows (setMaxRows) set by the statement or prepared statement, otherwise an exception is throws. Setting the value to 0 will set the default value. The default value can be changed using the system property h2.serverResultSetFetchSize.
      Specified by:
      setFetchSize in interface ResultSet
      Parameters:
      rows - the number of rows
      Throws:
      SQLException
    • setFetchDirection

      public void setFetchDirection(int direction) throws SQLException
      [Not supported] Sets (changes) the fetch direction for this result set. This method should only be called for scrollable result sets, otherwise it will throw an exception (no matter what direction is used).
      Specified by:
      setFetchDirection in interface ResultSet
      Parameters:
      direction - the new fetch direction
      Throws:
      SQLException - Unsupported Feature if the method is called for a forward-only result set
    • getType

      public int getType() throws SQLException
      Get the result set type.
      Specified by:
      getType in interface ResultSet
      Returns:
      the result set type (TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE or TYPE_SCROLL_SENSITIVE)
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • isBeforeFirst

      public boolean isBeforeFirst() throws SQLException
      Checks if the current position is before the first row, that means next() was not called yet, and there is at least one row.
      Specified by:
      isBeforeFirst in interface ResultSet
      Returns:
      if there are results and the current position is before the first row
      Throws:
      SQLException - if the result set is closed
    • isAfterLast

      public boolean isAfterLast() throws SQLException
      Checks if the current position is after the last row, that means next() was called and returned false, and there was at least one row.
      Specified by:
      isAfterLast in interface ResultSet
      Returns:
      if there are results and the current position is after the last row
      Throws:
      SQLException - if the result set is closed
    • isFirst

      public boolean isFirst() throws SQLException
      Checks if the current position is row 1, that means next() was called once and returned true.
      Specified by:
      isFirst in interface ResultSet
      Returns:
      if the current position is the first row
      Throws:
      SQLException - if the result set is closed
    • isLast

      public boolean isLast() throws SQLException
      Checks if the current position is the last row, that means next() was called and did not yet returned false, but will in the next call.
      Specified by:
      isLast in interface ResultSet
      Returns:
      if the current position is the last row
      Throws:
      SQLException - if the result set is closed
    • beforeFirst

      public void beforeFirst() throws SQLException
      Moves the current position to before the first row, that means resets the result set.
      Specified by:
      beforeFirst in interface ResultSet
      Throws:
      SQLException - if the result set is closed
    • afterLast

      public void afterLast() throws SQLException
      Moves the current position to after the last row, that means after the end.
      Specified by:
      afterLast in interface ResultSet
      Throws:
      SQLException - if the result set is closed
    • first

      public boolean first() throws SQLException
      Moves the current position to the first row. This is the same as calling beforeFirst() followed by next().
      Specified by:
      first in interface ResultSet
      Returns:
      true if there is a row available, false if not
      Throws:
      SQLException - if the result set is closed
    • last

      public boolean last() throws SQLException
      Moves the current position to the last row.
      Specified by:
      last in interface ResultSet
      Returns:
      true if there is a row available, false if not
      Throws:
      SQLException - if the result set is closed
    • absolute

      public boolean absolute(int rowNumber) throws SQLException
      Moves the current position to a specific row.
      Specified by:
      absolute in interface ResultSet
      Parameters:
      rowNumber - the row number. 0 is not allowed, 1 means the first row, 2 the second. -1 means the last row, -2 the row before the last row. If the value is too large, the position is moved after the last row, if the value is too small it is moved before the first row.
      Returns:
      true if there is a row available, false if not
      Throws:
      SQLException - if the result set is closed
    • relative

      public boolean relative(int rowCount) throws SQLException
      Moves the current position to a specific row relative to the current row.
      Specified by:
      relative in interface ResultSet
      Parameters:
      rowCount - 0 means don't do anything, 1 is the next row, -1 the previous. If the value is too large, the position is moved after the last row, if the value is too small it is moved before the first row.
      Returns:
      true if there is a row available, false if not
      Throws:
      SQLException - if the result set is closed
    • previous

      public boolean previous() throws SQLException
      Moves the cursor to the last row, or row before first row if the current position is the first row.
      Specified by:
      previous in interface ResultSet
      Returns:
      true if there is a row available, false if not
      Throws:
      SQLException - if the result set is closed
    • moveToInsertRow

      public void moveToInsertRow() throws SQLException
      Moves the current position to the insert row. The current row is remembered.
      Specified by:
      moveToInsertRow in interface ResultSet
      Throws:
      SQLException - if the result set is closed or is not updatable
    • moveToCurrentRow

      public void moveToCurrentRow() throws SQLException
      Moves the current position to the current row.
      Specified by:
      moveToCurrentRow in interface ResultSet
      Throws:
      SQLException - if the result set is closed or is not updatable
    • rowUpdated

      public boolean rowUpdated() throws SQLException
      Detects if the row was updated (by somebody else or the caller).
      Specified by:
      rowUpdated in interface ResultSet
      Returns:
      false because this driver does not detect this
      Throws:
      SQLException
    • rowInserted

      public boolean rowInserted() throws SQLException
      Detects if the row was inserted.
      Specified by:
      rowInserted in interface ResultSet
      Returns:
      false because this driver does not detect this
      Throws:
      SQLException
    • rowDeleted

      public boolean rowDeleted() throws SQLException
      Detects if the row was deleted (by somebody else or the caller).
      Specified by:
      rowDeleted in interface ResultSet
      Returns:
      false because this driver does not detect this
      Throws:
      SQLException
    • insertRow

      public void insertRow() throws SQLException
      Inserts the current row. The current position must be the insert row.
      Specified by:
      insertRow in interface ResultSet
      Throws:
      SQLException - if the result set is closed or if not on the insert row, or if the result set it not updatable
    • updateRow

      public void updateRow() throws SQLException
      Updates the current row.
      Specified by:
      updateRow in interface ResultSet
      Throws:
      SQLException - if the result set is closed, if the current row is the insert row or if not on a valid row, or if the result set it not updatable
    • deleteRow

      public void deleteRow() throws SQLException
      Deletes the current row.
      Specified by:
      deleteRow in interface ResultSet
      Throws:
      SQLException - if the result set is closed, if the current row is the insert row or if not on a valid row, or if the result set it not updatable
    • refreshRow

      public void refreshRow() throws SQLException
      Re-reads the current row from the database.
      Specified by:
      refreshRow in interface ResultSet
      Throws:
      SQLException - if the result set is closed or if the current row is the insert row or if the row has been deleted or if not on a valid row
    • cancelRowUpdates

      public void cancelRowUpdates() throws SQLException
      Cancels updating a row.
      Specified by:
      cancelRowUpdates in interface ResultSet
      Throws:
      SQLException - if the result set is closed or if the current row is the insert row
    • getUpdatableRow

      private UpdatableRow getUpdatableRow() throws SQLException
      Throws:
      SQLException
    • getColumnIndex

      private int getColumnIndex(String columnLabel)
    • checkColumnIndex

      private int checkColumnIndex(int columnIndex)
    • checkClosed

      void checkClosed()
      Check if this result set is closed.
      Throws:
      DbException - if it is closed
    • isOnValidRow

      private boolean isOnValidRow()
    • checkOnValidRow

      private void checkOnValidRow()
    • get

      private Value get(int columnIndex)
    • getInternal

      public Value getInternal(int columnIndex)
      INTERNAL
      Parameters:
      columnIndex - index of a column
      Returns:
      internal representation of the value in the specified column
    • update

      private void update(int columnIndex, Value v)
    • nextRow

      private boolean nextRow()
    • nextLazyRow

      private boolean nextLazyRow()
    • resetResult

      private void resetResult()
    • getRowId

      public RowId getRowId(int columnIndex) throws SQLException
      [Not supported] Returns the value of the specified column as a row id.
      Specified by:
      getRowId in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Throws:
      SQLException
    • getRowId

      public RowId getRowId(String columnLabel) throws SQLException
      [Not supported] Returns the value of the specified column as a row id.
      Specified by:
      getRowId in interface ResultSet
      Parameters:
      columnLabel - the column label
      Throws:
      SQLException
    • updateRowId

      public void updateRowId(int columnIndex, RowId x) throws SQLException
      [Not supported] Updates a column in the current or insert row.
      Specified by:
      updateRowId in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException
    • updateRowId

      public void updateRowId(String columnLabel, RowId x) throws SQLException
      [Not supported] Updates a column in the current or insert row.
      Specified by:
      updateRowId in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException
    • getHoldability

      public int getHoldability() throws SQLException
      Returns the current result set holdability.
      Specified by:
      getHoldability in interface ResultSet
      Returns:
      the holdability
      Throws:
      SQLException - if the connection is closed
    • isClosed

      public boolean isClosed() throws SQLException
      Returns whether this result set is closed.
      Specified by:
      isClosed in interface ResultSet
      Returns:
      true if the result set is closed
      Throws:
      SQLException
    • updateNString

      public void updateNString(int columnIndex, String x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateNString in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateNString

      public void updateNString(String columnLabel, String x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateNString in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateNClob

      public void updateNClob(int columnIndex, NClob x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateNClob in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateNClob

      public void updateNClob(int columnIndex, Reader x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateNClob in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateNClob

      public void updateNClob(int columnIndex, Reader x, long length) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateNClob in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      length - the length
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateNClob

      public void updateNClob(String columnLabel, Reader x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateNClob in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateNClob

      public void updateNClob(String columnLabel, Reader x, long length) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateNClob in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      length - the length
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateNClob

      public void updateNClob(String columnLabel, NClob x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateNClob in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateClobImpl

      private void updateClobImpl(int columnIndex, Clob x) throws SQLException
      Throws:
      SQLException
    • getNClob

      public NClob getNClob(int columnIndex) throws SQLException
      Returns the value of the specified column as a Clob.
      Specified by:
      getNClob in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getNClob

      public NClob getNClob(String columnLabel) throws SQLException
      Returns the value of the specified column as a Clob.
      Specified by:
      getNClob in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getClob

      private JdbcClob getClob(int id, int columnIndex)
    • getSQLXML

      public SQLXML getSQLXML(int columnIndex) throws SQLException
      Returns the value of the specified column as a SQLXML.
      Specified by:
      getSQLXML in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getSQLXML

      public SQLXML getSQLXML(String columnLabel) throws SQLException
      Returns the value of the specified column as a SQLXML.
      Specified by:
      getSQLXML in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • updateSQLXML

      public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateSQLXML in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      xmlObject - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateSQLXML

      public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateSQLXML in interface ResultSet
      Parameters:
      columnLabel - the column label
      xmlObject - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateSQLXMLImpl

      private void updateSQLXMLImpl(int columnIndex, SQLXML xmlObject) throws SQLException
      Throws:
      SQLException
    • getNString

      public String getNString(int columnIndex) throws SQLException
      Returns the value of the specified column as a String.
      Specified by:
      getNString in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getNString

      public String getNString(String columnLabel) throws SQLException
      Returns the value of the specified column as a String.
      Specified by:
      getNString in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getNCharacterStream

      public Reader getNCharacterStream(int columnIndex) throws SQLException
      Returns the value of the specified column as a reader.
      Specified by:
      getNCharacterStream in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getNCharacterStream

      public Reader getNCharacterStream(String columnLabel) throws SQLException
      Returns the value of the specified column as a reader.
      Specified by:
      getNCharacterStream in interface ResultSet
      Parameters:
      columnLabel - the column label
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • updateNCharacterStream

      public void updateNCharacterStream(int columnIndex, Reader x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateNCharacterStream in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateNCharacterStream

      public void updateNCharacterStream(int columnIndex, Reader x, long length) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateNCharacterStream in interface ResultSet
      Parameters:
      columnIndex - (1,2,...)
      x - the value
      length - the number of characters
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateNCharacterStream

      public void updateNCharacterStream(String columnLabel, Reader x) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateNCharacterStream in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateNCharacterStream

      public void updateNCharacterStream(String columnLabel, Reader x, long length) throws SQLException
      Updates a column in the current or insert row.
      Specified by:
      updateNCharacterStream in interface ResultSet
      Parameters:
      columnLabel - the column label
      x - the value
      length - the number of characters
      Throws:
      SQLException - if the result set is closed or not updatable
    • updateClobImpl

      private void updateClobImpl(int columnIndex, Reader x, long length)
    • unwrap

      public <T> T unwrap(Class<T> iface) throws SQLException
      Return an object of this class if possible.
      Specified by:
      unwrap in interface Wrapper
      Parameters:
      iface - the class
      Returns:
      this
      Throws:
      SQLException
    • isWrapperFor

      public boolean isWrapperFor(Class<?> iface) throws SQLException
      Checks if unwrap can return an object of this class.
      Specified by:
      isWrapperFor in interface Wrapper
      Parameters:
      iface - the class
      Returns:
      whether or not the interface is assignable from this class
      Throws:
      SQLException
    • getObject

      public <T> T getObject(int columnIndex, Class<T> type) throws SQLException
      Returns a column value as a Java object of the specified type.
      Specified by:
      getObject in interface ResultSet
      Parameters:
      columnIndex - the column index (1, 2, ...)
      type - the class of the returned value
      Returns:
      the value
      Throws:
      SQLException - if the column is not found or if the result set is closed
    • getObject

      public <T> T getObject(String columnName, Class<T> type) throws SQLException
      Returns a column value as a Java object of the specified type.
      Specified by:
      getObject in interface ResultSet
      Parameters:
      columnName - the column name
      type - the class of the returned value
      Returns:
      the value
      Throws:
      SQLException
    • toString

      public String toString()
      INTERNAL
      Overrides:
      toString in class Object
    • patchCurrentRow

      private void patchCurrentRow(Value[] row)
    • convertToValue

      private Value convertToValue(Object x, SQLType targetSqlType)
    • convertToUnknownValue

      private Value convertToUnknownValue(Object x)
    • checkUpdatable

      private void checkUpdatable()
    • getUpdateRow

      public Value[] getUpdateRow()
      INTERNAL
      Returns:
      array of column values for the current row
    • getResult

      public ResultInterface getResult()
      INTERNAL
      Returns:
      result