Package org.h2.tools
Class SimpleResultSet
java.lang.Object
org.h2.tools.SimpleResultSet
- All Implemented Interfaces:
AutoCloseable
,ResultSet
,ResultSetMetaData
,Wrapper
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" });
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A simple array implementation, backed by an object array -
Field Summary
Fields inherited from interface java.sql.ResultSet
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE
Fields inherited from interface java.sql.ResultSetMetaData
columnNoNulls, columnNullable, columnNullableUnknown
-
Constructor Summary
ConstructorDescriptionThis constructor is used if the result set is later populated with addRow.SimpleResultSet
(SimpleRowSource source) This constructor is used if the result set should retrieve the rows using the specified row source object. -
Method Summary
Modifier and TypeMethodDescriptionboolean
absolute
(int row) INTERNALvoid
Adds a column to the result set.void
Adds a column to the result set.void
Add a new row to the result set.void
INTERNALvoid
Moves the current position to before the first row, that means the result set is reset.void
INTERNALvoid
INTERNALvoid
close()
Closes the result set and releases the resources.void
INTERNALint
findColumn
(String columnLabel) Searches for a specific column in the result set.boolean
first()
INTERNALgetArray
(int columnIndex) Returns the value as a java.sql.Array.Returns the value as a java.sql.Array.getAsciiStream
(int columnIndex) INTERNALgetAsciiStream
(String columnLabel) INTERNALboolean
Get the current auto-close behavior.getBigDecimal
(int columnIndex) Returns the value as a java.math.BigDecimal.getBigDecimal
(int columnIndex, int scale) Deprecated.INTERNALgetBigDecimal
(String columnLabel) Returns the value as a java.math.BigDecimal.getBigDecimal
(String columnLabel, int scale) Deprecated.INTERNALgetBinaryStream
(int columnIndex) Returns the value as a java.io.InputStream.getBinaryStream
(String columnLabel) Returns the value as a java.io.InputStream.getBlob
(int columnIndex) Returns the value as a java.sql.Blob.Returns the value as a java.sql.Blob.boolean
getBoolean
(int columnIndex) Returns the value as a boolean.boolean
getBoolean
(String columnLabel) Returns the value as a boolean.byte
getByte
(int columnIndex) Returns the value as a byte.byte
Returns the value as a byte.byte[]
getBytes
(int columnIndex) Returns the value as a byte array.byte[]
Returns the value as a byte array.getCatalogName
(int columnIndex) Returns empty string.getCharacterStream
(int columnIndex) Returns the value as a java.io.Reader.getCharacterStream
(String columnLabel) Returns the value as a java.io.Reader.getClob
(int columnIndex) Returns the value as a java.sql.Clob.Returns the value as a java.sql.Clob.getColumnClassName
(int columnIndex) Returns the Java class name if this column.int
Returns the column count.int
getColumnDisplaySize
(int columnIndex) Returns 15.getColumnLabel
(int columnIndex) Returns the column label.getColumnName
(int columnIndex) Returns the column name.int
getColumnType
(int columnIndex) Returns the SQL type.getColumnTypeName
(int columnIndex) Returns the data type name of a column.int
Returns ResultSet.CONCUR_READ_ONLY.INTERNALgetDate
(int columnIndex) Returns the value as an java.sql.Date.INTERNALReturns the value as a java.sql.Date.INTERNALdouble
getDouble
(int columnIndex) Returns the value as an double.double
Returns the value as a double.int
Returns ResultSet.FETCH_FORWARD.int
Returns 0.float
getFloat
(int columnIndex) Returns the value as a float.float
Returns the value as a float.int
Returns the current result set holdability.int
getInt
(int columnIndex) Returns the value as an int.int
Returns the value as an int.long
getLong
(int columnIndex) Returns the value as a long.long
Returns the value as a long.Returns a reference to itself.getNCharacterStream
(int columnIndex) INTERNALgetNCharacterStream
(String columnLabel) INTERNALgetNClob
(int columnIndex) INTERNALINTERNALgetNString
(int columnIndex) INTERNALgetNString
(String columnLabel) INTERNALgetObject
(int columnIndex) Returns the value as an Object.<T> T
Returns the value as an Object of the specified type.INTERNALReturns the value as an Object.<T> T
Returns the value as an Object of the specified type.INTERNALint
getPrecision
(int columnIndex) Returns the precision.getRef
(int columnIndex) INTERNALINTERNALint
getRow()
Returns the row number (1, 2,...) or 0 for no row.getRowId
(int columnIndex) INTERNALINTERNALint
getScale
(int columnIndex) Returns the scale.getSchemaName
(int columnIndex) Returns empty string.short
getShort
(int columnIndex) Returns the value as a short.short
Returns the value as a short.getSQLXML
(int columnIndex) INTERNALINTERNALReturns null.getString
(int columnIndex) Returns the value as a String.Returns the value as a String.getTableName
(int columnIndex) Returns empty string.getTime
(int columnIndex) Returns the value as an java.sql.Time.INTERNALReturns the value as a java.sql.Time.INTERNALgetTimestamp
(int columnIndex) Returns the value as an java.sql.Timestamp.getTimestamp
(int columnIndex, Calendar cal) INTERNALgetTimestamp
(String columnLabel) Returns the value as a java.sql.Timestamp.getTimestamp
(String columnLabel, Calendar cal) INTERNALint
getType()
Returns the result set type.getUnicodeStream
(int columnIndex) Deprecated.INTERNALgetUnicodeStream
(String columnLabel) Deprecated.INTERNALgetURL
(int columnIndex) INTERNALINTERNALReturns null.void
INTERNALboolean
INTERNALboolean
isAutoIncrement
(int columnIndex) Returns false.boolean
INTERNALboolean
isCaseSensitive
(int columnIndex) Returns true.boolean
isClosed()
Returns whether this result set has been closed.boolean
isCurrency
(int columnIndex) Returns false.boolean
isDefinitelyWritable
(int columnIndex) Returns false.boolean
isFirst()
INTERNALboolean
isLast()
INTERNALint
isNullable
(int columnIndex) Returns ResultSetMetaData.columnNullableUnknown.boolean
isReadOnly
(int columnIndex) Returns true.boolean
isSearchable
(int columnIndex) Returns true.boolean
isSigned
(int columnIndex) Returns true.boolean
isWrapperFor
(Class<?> iface) Checks if unwrap can return an object of this class.boolean
isWritable
(int columnIndex) Returns false.boolean
last()
INTERNALvoid
INTERNALvoid
INTERNALboolean
next()
Moves the cursor to the next row of the result set.boolean
previous()
INTERNALvoid
INTERNALboolean
relative
(int offset) INTERNALboolean
INTERNALboolean
INTERNALboolean
INTERNALvoid
setAutoClose
(boolean autoClose) Set the auto-close behavior.void
setFetchDirection
(int direction) INTERNALvoid
setFetchSize
(int rows) INTERNAL<T> T
Return an object of this class if possible.void
updateArray
(int columnIndex, Array x) INTERNALvoid
updateArray
(String columnLabel, Array x) INTERNALvoid
updateAsciiStream
(int columnIndex, InputStream x) INTERNALvoid
updateAsciiStream
(int columnIndex, InputStream x, int length) INTERNALvoid
updateAsciiStream
(int columnIndex, InputStream x, long length) INTERNALvoid
updateAsciiStream
(String columnLabel, InputStream x) INTERNALvoid
updateAsciiStream
(String columnLabel, InputStream x, int length) INTERNALvoid
updateAsciiStream
(String columnLabel, InputStream x, long length) INTERNALvoid
updateBigDecimal
(int columnIndex, BigDecimal x) INTERNALvoid
updateBigDecimal
(String columnLabel, BigDecimal x) INTERNALvoid
updateBinaryStream
(int columnIndex, InputStream x) INTERNALvoid
updateBinaryStream
(int columnIndex, InputStream x, int length) INTERNALvoid
updateBinaryStream
(int columnIndex, InputStream x, long length) INTERNALvoid
updateBinaryStream
(String columnLabel, InputStream x) INTERNALvoid
updateBinaryStream
(String columnLabel, InputStream x, int length) INTERNALvoid
updateBinaryStream
(String columnLabel, InputStream x, long length) INTERNALvoid
updateBlob
(int columnIndex, InputStream x) INTERNALvoid
updateBlob
(int columnIndex, InputStream x, long length) INTERNALvoid
updateBlob
(int columnIndex, Blob x) INTERNALvoid
updateBlob
(String columnLabel, InputStream x) INTERNALvoid
updateBlob
(String columnLabel, InputStream x, long length) INTERNALvoid
updateBlob
(String columnLabel, Blob x) INTERNALvoid
updateBoolean
(int columnIndex, boolean x) INTERNALvoid
updateBoolean
(String columnLabel, boolean x) INTERNALvoid
updateByte
(int columnIndex, byte x) INTERNALvoid
updateByte
(String columnLabel, byte x) INTERNALvoid
updateBytes
(int columnIndex, byte[] x) INTERNALvoid
updateBytes
(String columnLabel, byte[] x) INTERNALvoid
updateCharacterStream
(int columnIndex, Reader x) INTERNALvoid
updateCharacterStream
(int columnIndex, Reader x, int length) INTERNALvoid
updateCharacterStream
(int columnIndex, Reader x, long length) INTERNALvoid
updateCharacterStream
(String columnLabel, Reader x) INTERNALvoid
updateCharacterStream
(String columnLabel, Reader x, int length) INTERNALvoid
updateCharacterStream
(String columnLabel, Reader x, long length) INTERNALvoid
updateClob
(int columnIndex, Reader x) INTERNALvoid
updateClob
(int columnIndex, Reader x, long length) INTERNALvoid
updateClob
(int columnIndex, Clob x) INTERNALvoid
updateClob
(String columnLabel, Reader x) INTERNALvoid
updateClob
(String columnLabel, Reader x, long length) INTERNALvoid
updateClob
(String columnLabel, Clob x) INTERNALvoid
updateDate
(int columnIndex, Date x) INTERNALvoid
updateDate
(String columnLabel, Date x) INTERNALvoid
updateDouble
(int columnIndex, double x) INTERNALvoid
updateDouble
(String columnLabel, double x) INTERNALvoid
updateFloat
(int columnIndex, float x) INTERNALvoid
updateFloat
(String columnLabel, float x) INTERNALvoid
updateInt
(int columnIndex, int x) INTERNALvoid
INTERNALvoid
updateLong
(int columnIndex, long x) INTERNALvoid
updateLong
(String columnLabel, long x) INTERNALvoid
updateNCharacterStream
(int columnIndex, Reader x) INTERNALvoid
updateNCharacterStream
(int columnIndex, Reader x, long length) INTERNALvoid
updateNCharacterStream
(String columnLabel, Reader x) INTERNALvoid
updateNCharacterStream
(String columnLabel, Reader x, long length) INTERNALvoid
updateNClob
(int columnIndex, Reader x) INTERNALvoid
updateNClob
(int columnIndex, Reader x, long length) INTERNALvoid
updateNClob
(int columnIndex, NClob x) INTERNALvoid
updateNClob
(String columnLabel, Reader x) INTERNALvoid
updateNClob
(String columnLabel, Reader x, long length) INTERNALvoid
updateNClob
(String columnLabel, NClob x) INTERNALvoid
updateNString
(int columnIndex, String x) INTERNALvoid
updateNString
(String columnLabel, String x) INTERNALvoid
updateNull
(int columnIndex) INTERNALvoid
updateNull
(String columnLabel) INTERNALvoid
updateObject
(int columnIndex, Object x) INTERNALvoid
updateObject
(int columnIndex, Object x, int scale) INTERNALvoid
updateObject
(String columnLabel, Object x) INTERNALvoid
updateObject
(String columnLabel, Object x, int scale) INTERNALvoid
INTERNALvoid
INTERNALvoid
INTERNALvoid
updateRowId
(int columnIndex, RowId x) INTERNALvoid
updateRowId
(String columnLabel, RowId x) INTERNALvoid
updateShort
(int columnIndex, short x) INTERNALvoid
updateShort
(String columnLabel, short x) INTERNALvoid
updateSQLXML
(int columnIndex, SQLXML x) INTERNALvoid
updateSQLXML
(String columnLabel, SQLXML x) INTERNALvoid
updateString
(int columnIndex, String x) INTERNALvoid
updateString
(String columnLabel, String x) INTERNALvoid
updateTime
(int columnIndex, Time x) INTERNALvoid
updateTime
(String columnLabel, Time x) INTERNALvoid
updateTimestamp
(int columnIndex, Timestamp x) INTERNALvoid
updateTimestamp
(String columnLabel, Timestamp x) INTERNALboolean
wasNull()
Returns whether the last column accessed was null.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.sql.ResultSet
updateObject, updateObject, updateObject, updateObject
-
Constructor Details
-
SimpleResultSet
public SimpleResultSet()This constructor is used if the result set is later populated with addRow. -
SimpleResultSet
This constructor is used if the result set should retrieve the rows using the specified row source object.- Parameters:
source
- the row source
-
-
Method Details
-
addColumn
Adds a column to the result set. All columns must be added before adding rows. This method uses the default SQL type names.- Parameters:
name
- null is replaced with C1, C2,...sqlType
- the value returned in getColumnType(..)precision
- the precisionscale
- the scale
-
addColumn
Adds a column to the result set. All columns must be added before adding rows.- Parameters:
name
- null is replaced with C1, C2,...sqlType
- the value returned in getColumnType(..)sqlTypeName
- the type name return in getColumnTypeName(..)precision
- the precisionscale
- the scale
-
addRow
Add a new row to the result set. Do not use this method when using a RowSource.- Parameters:
row
- the row as an array of objects
-
getConcurrency
public int getConcurrency()Returns ResultSet.CONCUR_READ_ONLY.- Specified by:
getConcurrency
in interfaceResultSet
- Returns:
- CONCUR_READ_ONLY
-
getFetchDirection
public int getFetchDirection()Returns ResultSet.FETCH_FORWARD.- Specified by:
getFetchDirection
in interfaceResultSet
- Returns:
- FETCH_FORWARD
-
getFetchSize
public int getFetchSize()Returns 0.- Specified by:
getFetchSize
in interfaceResultSet
- Returns:
- 0
-
getRow
public int getRow()Returns the row number (1, 2,...) or 0 for no row. -
getType
public int getType()Returns the result set type. This is ResultSet.TYPE_FORWARD_ONLY for auto-close result sets, and ResultSet.TYPE_SCROLL_INSENSITIVE for others. -
close
public void close()Closes the result set and releases the resources.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceResultSet
-
next
Moves the cursor to the next row of the result set.- Specified by:
next
in interfaceResultSet
- Returns:
- true if successful, false if there are no more rows
- Throws:
SQLException
-
beforeFirst
Moves the current position to before the first row, that means the result set is reset.- Specified by:
beforeFirst
in interfaceResultSet
- Throws:
SQLException
-
wasNull
public boolean wasNull()Returns whether the last column accessed was null. -
findColumn
Searches for a specific column in the result set. A case-insensitive search is made.- Specified by:
findColumn
in interfaceResultSet
- 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
-
getMetaData
Returns a reference to itself.- Specified by:
getMetaData
in interfaceResultSet
- Returns:
- this
-
getWarnings
Returns null.- Specified by:
getWarnings
in interfaceResultSet
- Returns:
- null
-
getStatement
Returns null.- Specified by:
getStatement
in interfaceResultSet
- Returns:
- null
-
clearWarnings
public void clearWarnings()INTERNAL- Specified by:
clearWarnings
in interfaceResultSet
-
getArray
Returns the value as a java.sql.Array.- Specified by:
getArray
in interfaceResultSet
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getArray
Returns the value as a java.sql.Array.- Specified by:
getArray
in interfaceResultSet
- Parameters:
columnLabel
- the column label- Returns:
- the value
- Throws:
SQLException
-
getAsciiStream
INTERNAL- Specified by:
getAsciiStream
in interfaceResultSet
- Throws:
SQLException
-
getAsciiStream
INTERNAL- Specified by:
getAsciiStream
in interfaceResultSet
- Throws:
SQLException
-
getBigDecimal
Returns the value as a java.math.BigDecimal.- Specified by:
getBigDecimal
in interfaceResultSet
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getBigDecimal
Returns the value as a java.math.BigDecimal.- Specified by:
getBigDecimal
in interfaceResultSet
- Parameters:
columnLabel
- the column label- Returns:
- the value
- Throws:
SQLException
-
getBigDecimal
Deprecated.INTERNAL- Specified by:
getBigDecimal
in interfaceResultSet
- Throws:
SQLException
-
getBigDecimal
Deprecated.INTERNAL- Specified by:
getBigDecimal
in interfaceResultSet
- Throws:
SQLException
-
getBinaryStream
Returns the value as a java.io.InputStream.- Specified by:
getBinaryStream
in interfaceResultSet
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getBinaryStream
Returns the value as a java.io.InputStream.- Specified by:
getBinaryStream
in interfaceResultSet
- Parameters:
columnLabel
- the column label- Returns:
- the value
- Throws:
SQLException
-
getBlob
Returns the value as a java.sql.Blob. This is only supported if the result set was created using a Blob object.- Specified by:
getBlob
in interfaceResultSet
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getBlob
Returns the value as a java.sql.Blob. This is only supported if the result set was created using a Blob object.- Specified by:
getBlob
in interfaceResultSet
- Parameters:
columnLabel
- the column label- Returns:
- the value
- Throws:
SQLException
-
getBoolean
Returns the value as a boolean.- Specified by:
getBoolean
in interfaceResultSet
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getBoolean
Returns the value as a boolean.- Specified by:
getBoolean
in interfaceResultSet
- Parameters:
columnLabel
- the column label- Returns:
- the value
- Throws:
SQLException
-
getByte
Returns the value as a byte.- Specified by:
getByte
in interfaceResultSet
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getByte
Returns the value as a byte.- Specified by:
getByte
in interfaceResultSet
- Parameters:
columnLabel
- the column label- Returns:
- the value
- Throws:
SQLException
-
getBytes
Returns the value as a byte array.- Specified by:
getBytes
in interfaceResultSet
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getBytes
Returns the value as a byte array.- Specified by:
getBytes
in interfaceResultSet
- Parameters:
columnLabel
- the column label- Returns:
- the value
- Throws:
SQLException
-
getCharacterStream
Returns the value as a java.io.Reader. This is only supported if the result set was created using a Clob or Reader object.- Specified by:
getCharacterStream
in interfaceResultSet
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getCharacterStream
Returns the value as a java.io.Reader. This is only supported if the result set was created using a Clob or Reader object.- Specified by:
getCharacterStream
in interfaceResultSet
- Parameters:
columnLabel
- the column label- Returns:
- the value
- Throws:
SQLException
-
getClob
Returns the value as a java.sql.Clob. This is only supported if the result set was created using a Clob object.- Specified by:
getClob
in interfaceResultSet
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getClob
Returns the value as a java.sql.Clob. This is only supported if the result set was created using a Clob object.- Specified by:
getClob
in interfaceResultSet
- Parameters:
columnLabel
- the column label- Returns:
- the value
- Throws:
SQLException
-
getDate
Returns the value as an java.sql.Date.- Specified by:
getDate
in interfaceResultSet
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getDate
Returns the value as a java.sql.Date.- Specified by:
getDate
in interfaceResultSet
- Parameters:
columnLabel
- the column label- Returns:
- the value
- Throws:
SQLException
-
getDate
INTERNAL- Specified by:
getDate
in interfaceResultSet
- Throws:
SQLException
-
getDate
INTERNAL- Specified by:
getDate
in interfaceResultSet
- Throws:
SQLException
-
getDouble
Returns the value as an double.- Specified by:
getDouble
in interfaceResultSet
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getDouble
Returns the value as a double.- Specified by:
getDouble
in interfaceResultSet
- Parameters:
columnLabel
- the column label- Returns:
- the value
- Throws:
SQLException
-
getFloat
Returns the value as a float.- Specified by:
getFloat
in interfaceResultSet
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getFloat
Returns the value as a float.- Specified by:
getFloat
in interfaceResultSet
- Parameters:
columnLabel
- the column label- Returns:
- the value
- Throws:
SQLException
-
getInt
Returns the value as an int.- Specified by:
getInt
in interfaceResultSet
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getInt
Returns the value as an int.- Specified by:
getInt
in interfaceResultSet
- Parameters:
columnLabel
- the column label- Returns:
- the value
- Throws:
SQLException
-
getLong
Returns the value as a long.- Specified by:
getLong
in interfaceResultSet
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getLong
Returns the value as a long.- Specified by:
getLong
in interfaceResultSet
- Parameters:
columnLabel
- the column label- Returns:
- the value
- Throws:
SQLException
-
getNCharacterStream
INTERNAL- Specified by:
getNCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
getNCharacterStream
INTERNAL- Specified by:
getNCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
getNClob
INTERNAL- Specified by:
getNClob
in interfaceResultSet
- Throws:
SQLException
-
getNClob
INTERNAL- Specified by:
getNClob
in interfaceResultSet
- Throws:
SQLException
-
getNString
INTERNAL- Specified by:
getNString
in interfaceResultSet
- Throws:
SQLException
-
getNString
INTERNAL- Specified by:
getNString
in interfaceResultSet
- Throws:
SQLException
-
getObject
Returns the value as an Object.- Specified by:
getObject
in interfaceResultSet
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getObject
Returns the value as an Object.- Specified by:
getObject
in interfaceResultSet
- Parameters:
columnLabel
- the column label- Returns:
- the value
- Throws:
SQLException
-
getObject
Returns the value as an Object of the specified type.- Specified by:
getObject
in interfaceResultSet
- Parameters:
columnIndex
- the column index (1, 2, ...)type
- the class of the returned value- Returns:
- the value
- Throws:
SQLException
-
getObject
Returns the value as an Object of the specified type.- Specified by:
getObject
in interfaceResultSet
- Parameters:
columnName
- the column nametype
- the class of the returned value- Returns:
- the value
- Throws:
SQLException
-
getObject
INTERNAL- Specified by:
getObject
in interfaceResultSet
- Throws:
SQLException
-
getObject
INTERNAL- Specified by:
getObject
in interfaceResultSet
- Throws:
SQLException
-
getRef
INTERNAL- Specified by:
getRef
in interfaceResultSet
- Throws:
SQLException
-
getRef
INTERNAL- Specified by:
getRef
in interfaceResultSet
- Throws:
SQLException
-
getRowId
INTERNAL- Specified by:
getRowId
in interfaceResultSet
- Throws:
SQLException
-
getRowId
INTERNAL- Specified by:
getRowId
in interfaceResultSet
- Throws:
SQLException
-
getShort
Returns the value as a short.- Specified by:
getShort
in interfaceResultSet
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getShort
Returns the value as a short.- Specified by:
getShort
in interfaceResultSet
- Parameters:
columnLabel
- the column label- Returns:
- the value
- Throws:
SQLException
-
getSQLXML
INTERNAL- Specified by:
getSQLXML
in interfaceResultSet
- Throws:
SQLException
-
getSQLXML
INTERNAL- Specified by:
getSQLXML
in interfaceResultSet
- Throws:
SQLException
-
getString
Returns the value as a String.- Specified by:
getString
in interfaceResultSet
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getString
Returns the value as a String.- Specified by:
getString
in interfaceResultSet
- Parameters:
columnLabel
- the column label- Returns:
- the value
- Throws:
SQLException
-
getTime
Returns the value as an java.sql.Time.- Specified by:
getTime
in interfaceResultSet
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getTime
Returns the value as a java.sql.Time.- Specified by:
getTime
in interfaceResultSet
- Parameters:
columnLabel
- the column label- Returns:
- the value
- Throws:
SQLException
-
getTime
INTERNAL- Specified by:
getTime
in interfaceResultSet
- Throws:
SQLException
-
getTime
INTERNAL- Specified by:
getTime
in interfaceResultSet
- Throws:
SQLException
-
getTimestamp
Returns the value as an java.sql.Timestamp.- Specified by:
getTimestamp
in interfaceResultSet
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getTimestamp
Returns the value as a java.sql.Timestamp.- Specified by:
getTimestamp
in interfaceResultSet
- Parameters:
columnLabel
- the column label- Returns:
- the value
- Throws:
SQLException
-
getTimestamp
INTERNAL- Specified by:
getTimestamp
in interfaceResultSet
- Throws:
SQLException
-
getTimestamp
INTERNAL- Specified by:
getTimestamp
in interfaceResultSet
- Throws:
SQLException
-
getUnicodeStream
Deprecated.INTERNAL- Specified by:
getUnicodeStream
in interfaceResultSet
- Throws:
SQLException
-
getUnicodeStream
Deprecated.INTERNAL- Specified by:
getUnicodeStream
in interfaceResultSet
- Throws:
SQLException
-
getURL
INTERNAL- Specified by:
getURL
in interfaceResultSet
- Throws:
SQLException
-
getURL
INTERNAL- Specified by:
getURL
in interfaceResultSet
- Throws:
SQLException
-
updateArray
INTERNAL- Specified by:
updateArray
in interfaceResultSet
- Throws:
SQLException
-
updateArray
INTERNAL- Specified by:
updateArray
in interfaceResultSet
- Throws:
SQLException
-
updateAsciiStream
INTERNAL- Specified by:
updateAsciiStream
in interfaceResultSet
- Throws:
SQLException
-
updateAsciiStream
INTERNAL- Specified by:
updateAsciiStream
in interfaceResultSet
- Throws:
SQLException
-
updateAsciiStream
INTERNAL- Specified by:
updateAsciiStream
in interfaceResultSet
- Throws:
SQLException
-
updateAsciiStream
INTERNAL- Specified by:
updateAsciiStream
in interfaceResultSet
- Throws:
SQLException
-
updateAsciiStream
INTERNAL- Specified by:
updateAsciiStream
in interfaceResultSet
- Throws:
SQLException
-
updateAsciiStream
INTERNAL- Specified by:
updateAsciiStream
in interfaceResultSet
- Throws:
SQLException
-
updateBigDecimal
INTERNAL- Specified by:
updateBigDecimal
in interfaceResultSet
- Throws:
SQLException
-
updateBigDecimal
INTERNAL- Specified by:
updateBigDecimal
in interfaceResultSet
- Throws:
SQLException
-
updateBinaryStream
INTERNAL- Specified by:
updateBinaryStream
in interfaceResultSet
- Throws:
SQLException
-
updateBinaryStream
INTERNAL- Specified by:
updateBinaryStream
in interfaceResultSet
- Throws:
SQLException
-
updateBinaryStream
INTERNAL- Specified by:
updateBinaryStream
in interfaceResultSet
- Throws:
SQLException
-
updateBinaryStream
INTERNAL- Specified by:
updateBinaryStream
in interfaceResultSet
- Throws:
SQLException
-
updateBinaryStream
INTERNAL- Specified by:
updateBinaryStream
in interfaceResultSet
- Throws:
SQLException
-
updateBinaryStream
INTERNAL- Specified by:
updateBinaryStream
in interfaceResultSet
- Throws:
SQLException
-
updateBlob
INTERNAL- Specified by:
updateBlob
in interfaceResultSet
- Throws:
SQLException
-
updateBlob
INTERNAL- Specified by:
updateBlob
in interfaceResultSet
- Throws:
SQLException
-
updateBlob
INTERNAL- Specified by:
updateBlob
in interfaceResultSet
- Throws:
SQLException
-
updateBlob
INTERNAL- Specified by:
updateBlob
in interfaceResultSet
- Throws:
SQLException
-
updateBlob
INTERNAL- Specified by:
updateBlob
in interfaceResultSet
- Throws:
SQLException
-
updateBlob
INTERNAL- Specified by:
updateBlob
in interfaceResultSet
- Throws:
SQLException
-
updateBoolean
INTERNAL- Specified by:
updateBoolean
in interfaceResultSet
- Throws:
SQLException
-
updateBoolean
INTERNAL- Specified by:
updateBoolean
in interfaceResultSet
- Throws:
SQLException
-
updateByte
INTERNAL- Specified by:
updateByte
in interfaceResultSet
- Throws:
SQLException
-
updateByte
INTERNAL- Specified by:
updateByte
in interfaceResultSet
- Throws:
SQLException
-
updateBytes
INTERNAL- Specified by:
updateBytes
in interfaceResultSet
- Throws:
SQLException
-
updateBytes
INTERNAL- Specified by:
updateBytes
in interfaceResultSet
- Throws:
SQLException
-
updateCharacterStream
INTERNAL- Specified by:
updateCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateCharacterStream
INTERNAL- Specified by:
updateCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateCharacterStream
INTERNAL- Specified by:
updateCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateCharacterStream
INTERNAL- Specified by:
updateCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateCharacterStream
INTERNAL- Specified by:
updateCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateCharacterStream
INTERNAL- Specified by:
updateCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateClob
INTERNAL- Specified by:
updateClob
in interfaceResultSet
- Throws:
SQLException
-
updateClob
INTERNAL- Specified by:
updateClob
in interfaceResultSet
- Throws:
SQLException
-
updateClob
INTERNAL- Specified by:
updateClob
in interfaceResultSet
- Throws:
SQLException
-
updateClob
INTERNAL- Specified by:
updateClob
in interfaceResultSet
- Throws:
SQLException
-
updateClob
INTERNAL- Specified by:
updateClob
in interfaceResultSet
- Throws:
SQLException
-
updateClob
INTERNAL- Specified by:
updateClob
in interfaceResultSet
- Throws:
SQLException
-
updateDate
INTERNAL- Specified by:
updateDate
in interfaceResultSet
- Throws:
SQLException
-
updateDate
INTERNAL- Specified by:
updateDate
in interfaceResultSet
- Throws:
SQLException
-
updateDouble
INTERNAL- Specified by:
updateDouble
in interfaceResultSet
- Throws:
SQLException
-
updateDouble
INTERNAL- Specified by:
updateDouble
in interfaceResultSet
- Throws:
SQLException
-
updateFloat
INTERNAL- Specified by:
updateFloat
in interfaceResultSet
- Throws:
SQLException
-
updateFloat
INTERNAL- Specified by:
updateFloat
in interfaceResultSet
- Throws:
SQLException
-
updateInt
INTERNAL- Specified by:
updateInt
in interfaceResultSet
- Throws:
SQLException
-
updateInt
INTERNAL- Specified by:
updateInt
in interfaceResultSet
- Throws:
SQLException
-
updateLong
INTERNAL- Specified by:
updateLong
in interfaceResultSet
- Throws:
SQLException
-
updateLong
INTERNAL- Specified by:
updateLong
in interfaceResultSet
- Throws:
SQLException
-
updateNCharacterStream
INTERNAL- Specified by:
updateNCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateNCharacterStream
INTERNAL- Specified by:
updateNCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateNCharacterStream
INTERNAL- Specified by:
updateNCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateNCharacterStream
INTERNAL- Specified by:
updateNCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateNClob
INTERNAL- Specified by:
updateNClob
in interfaceResultSet
- Throws:
SQLException
-
updateNClob
INTERNAL- Specified by:
updateNClob
in interfaceResultSet
- Throws:
SQLException
-
updateNClob
INTERNAL- Specified by:
updateNClob
in interfaceResultSet
- Throws:
SQLException
-
updateNClob
INTERNAL- Specified by:
updateNClob
in interfaceResultSet
- Throws:
SQLException
-
updateNClob
INTERNAL- Specified by:
updateNClob
in interfaceResultSet
- Throws:
SQLException
-
updateNClob
INTERNAL- Specified by:
updateNClob
in interfaceResultSet
- Throws:
SQLException
-
updateNString
INTERNAL- Specified by:
updateNString
in interfaceResultSet
- Throws:
SQLException
-
updateNString
INTERNAL- Specified by:
updateNString
in interfaceResultSet
- Throws:
SQLException
-
updateNull
INTERNAL- Specified by:
updateNull
in interfaceResultSet
- Throws:
SQLException
-
updateNull
INTERNAL- Specified by:
updateNull
in interfaceResultSet
- Throws:
SQLException
-
updateObject
INTERNAL- Specified by:
updateObject
in interfaceResultSet
- Throws:
SQLException
-
updateObject
INTERNAL- Specified by:
updateObject
in interfaceResultSet
- Throws:
SQLException
-
updateObject
INTERNAL- Specified by:
updateObject
in interfaceResultSet
- Throws:
SQLException
-
updateObject
INTERNAL- Specified by:
updateObject
in interfaceResultSet
- Throws:
SQLException
-
updateRef
INTERNAL- Specified by:
updateRef
in interfaceResultSet
- Throws:
SQLException
-
updateRef
INTERNAL- Specified by:
updateRef
in interfaceResultSet
- Throws:
SQLException
-
updateRowId
INTERNAL- Specified by:
updateRowId
in interfaceResultSet
- Throws:
SQLException
-
updateRowId
INTERNAL- Specified by:
updateRowId
in interfaceResultSet
- Throws:
SQLException
-
updateShort
INTERNAL- Specified by:
updateShort
in interfaceResultSet
- Throws:
SQLException
-
updateShort
INTERNAL- Specified by:
updateShort
in interfaceResultSet
- Throws:
SQLException
-
updateSQLXML
INTERNAL- Specified by:
updateSQLXML
in interfaceResultSet
- Throws:
SQLException
-
updateSQLXML
INTERNAL- Specified by:
updateSQLXML
in interfaceResultSet
- Throws:
SQLException
-
updateString
INTERNAL- Specified by:
updateString
in interfaceResultSet
- Throws:
SQLException
-
updateString
INTERNAL- Specified by:
updateString
in interfaceResultSet
- Throws:
SQLException
-
updateTime
INTERNAL- Specified by:
updateTime
in interfaceResultSet
- Throws:
SQLException
-
updateTime
INTERNAL- Specified by:
updateTime
in interfaceResultSet
- Throws:
SQLException
-
updateTimestamp
INTERNAL- Specified by:
updateTimestamp
in interfaceResultSet
- Throws:
SQLException
-
updateTimestamp
INTERNAL- Specified by:
updateTimestamp
in interfaceResultSet
- Throws:
SQLException
-
getColumnCount
public int getColumnCount()Returns the column count.- Specified by:
getColumnCount
in interfaceResultSetMetaData
- Returns:
- the column count
-
getColumnDisplaySize
public int getColumnDisplaySize(int columnIndex) Returns 15.- Specified by:
getColumnDisplaySize
in interfaceResultSetMetaData
- Parameters:
columnIndex
- (1,2,...)- Returns:
- 15
-
getColumnType
Returns the SQL type.- Specified by:
getColumnType
in interfaceResultSetMetaData
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the SQL type
- Throws:
SQLException
-
getPrecision
Returns the precision.- Specified by:
getPrecision
in interfaceResultSetMetaData
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the precision
- Throws:
SQLException
-
getScale
Returns the scale.- Specified by:
getScale
in interfaceResultSetMetaData
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the scale
- Throws:
SQLException
-
isNullable
public int isNullable(int columnIndex) Returns ResultSetMetaData.columnNullableUnknown.- Specified by:
isNullable
in interfaceResultSetMetaData
- Parameters:
columnIndex
- (1,2,...)- Returns:
- columnNullableUnknown
-
isAutoIncrement
public boolean isAutoIncrement(int columnIndex) Returns false.- Specified by:
isAutoIncrement
in interfaceResultSetMetaData
- Parameters:
columnIndex
- (1,2,...)- Returns:
- false
-
isCaseSensitive
public boolean isCaseSensitive(int columnIndex) Returns true.- Specified by:
isCaseSensitive
in interfaceResultSetMetaData
- Parameters:
columnIndex
- (1,2,...)- Returns:
- true
-
isCurrency
public boolean isCurrency(int columnIndex) Returns false.- Specified by:
isCurrency
in interfaceResultSetMetaData
- Parameters:
columnIndex
- (1,2,...)- Returns:
- false
-
isDefinitelyWritable
public boolean isDefinitelyWritable(int columnIndex) Returns false.- Specified by:
isDefinitelyWritable
in interfaceResultSetMetaData
- Parameters:
columnIndex
- (1,2,...)- Returns:
- false
-
isReadOnly
public boolean isReadOnly(int columnIndex) Returns true.- Specified by:
isReadOnly
in interfaceResultSetMetaData
- Parameters:
columnIndex
- (1,2,...)- Returns:
- true
-
isSearchable
public boolean isSearchable(int columnIndex) Returns true.- Specified by:
isSearchable
in interfaceResultSetMetaData
- Parameters:
columnIndex
- (1,2,...)- Returns:
- true
-
isSigned
public boolean isSigned(int columnIndex) Returns true.- Specified by:
isSigned
in interfaceResultSetMetaData
- Parameters:
columnIndex
- (1,2,...)- Returns:
- true
-
isWritable
public boolean isWritable(int columnIndex) Returns false.- Specified by:
isWritable
in interfaceResultSetMetaData
- Parameters:
columnIndex
- (1,2,...)- Returns:
- false
-
getCatalogName
Returns empty string.- Specified by:
getCatalogName
in interfaceResultSetMetaData
- Parameters:
columnIndex
- (1,2,...)- Returns:
- empty string
-
getColumnClassName
Returns the Java class name if this column.- Specified by:
getColumnClassName
in interfaceResultSetMetaData
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the class name
- Throws:
SQLException
-
getColumnLabel
Returns the column label.- Specified by:
getColumnLabel
in interfaceResultSetMetaData
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the column label
- Throws:
SQLException
-
getColumnName
Returns the column name.- Specified by:
getColumnName
in interfaceResultSetMetaData
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the column name
- Throws:
SQLException
-
getColumnTypeName
Returns the data type name of a column.- Specified by:
getColumnTypeName
in interfaceResultSetMetaData
- Parameters:
columnIndex
- (1,2,...)- Returns:
- the type name
- Throws:
SQLException
-
getSchemaName
Returns empty string.- Specified by:
getSchemaName
in interfaceResultSetMetaData
- Parameters:
columnIndex
- (1,2,...)- Returns:
- empty string
-
getTableName
Returns empty string.- Specified by:
getTableName
in interfaceResultSetMetaData
- Parameters:
columnIndex
- (1,2,...)- Returns:
- empty string
-
afterLast
INTERNAL- Specified by:
afterLast
in interfaceResultSet
- Throws:
SQLException
-
cancelRowUpdates
INTERNAL- Specified by:
cancelRowUpdates
in interfaceResultSet
- Throws:
SQLException
-
deleteRow
INTERNAL- Specified by:
deleteRow
in interfaceResultSet
- Throws:
SQLException
-
insertRow
INTERNAL- Specified by:
insertRow
in interfaceResultSet
- Throws:
SQLException
-
moveToCurrentRow
INTERNAL- Specified by:
moveToCurrentRow
in interfaceResultSet
- Throws:
SQLException
-
moveToInsertRow
INTERNAL- Specified by:
moveToInsertRow
in interfaceResultSet
- Throws:
SQLException
-
refreshRow
INTERNAL- Specified by:
refreshRow
in interfaceResultSet
- Throws:
SQLException
-
updateRow
INTERNAL- Specified by:
updateRow
in interfaceResultSet
- Throws:
SQLException
-
first
INTERNAL- Specified by:
first
in interfaceResultSet
- Throws:
SQLException
-
isAfterLast
INTERNAL- Specified by:
isAfterLast
in interfaceResultSet
- Throws:
SQLException
-
isBeforeFirst
INTERNAL- Specified by:
isBeforeFirst
in interfaceResultSet
- Throws:
SQLException
-
isFirst
INTERNAL- Specified by:
isFirst
in interfaceResultSet
- Throws:
SQLException
-
isLast
INTERNAL- Specified by:
isLast
in interfaceResultSet
- Throws:
SQLException
-
last
INTERNAL- Specified by:
last
in interfaceResultSet
- Throws:
SQLException
-
previous
INTERNAL- Specified by:
previous
in interfaceResultSet
- Throws:
SQLException
-
rowDeleted
INTERNAL- Specified by:
rowDeleted
in interfaceResultSet
- Throws:
SQLException
-
rowInserted
INTERNAL- Specified by:
rowInserted
in interfaceResultSet
- Throws:
SQLException
-
rowUpdated
INTERNAL- Specified by:
rowUpdated
in interfaceResultSet
- Throws:
SQLException
-
setFetchDirection
INTERNAL- Specified by:
setFetchDirection
in interfaceResultSet
- Throws:
SQLException
-
setFetchSize
INTERNAL- Specified by:
setFetchSize
in interfaceResultSet
- Throws:
SQLException
-
absolute
INTERNAL- Specified by:
absolute
in interfaceResultSet
- Throws:
SQLException
-
relative
INTERNAL- Specified by:
relative
in interfaceResultSet
- Throws:
SQLException
-
getCursorName
INTERNAL- Specified by:
getCursorName
in interfaceResultSet
- Throws:
SQLException
-
getHoldability
public int getHoldability()Returns the current result set holdability.- Specified by:
getHoldability
in interfaceResultSet
- Returns:
- the holdability
-
isClosed
public boolean isClosed()Returns whether this result set has been closed. -
unwrap
Return an object of this class if possible.- Specified by:
unwrap
in interfaceWrapper
- Parameters:
iface
- the class- Returns:
- this
- Throws:
SQLException
-
isWrapperFor
Checks if unwrap can return an object of this class.- Specified by:
isWrapperFor
in interfaceWrapper
- Parameters:
iface
- the class- Returns:
- whether or not the interface is assignable from this class
- Throws:
SQLException
-
setAutoClose
public void setAutoClose(boolean autoClose) Set the auto-close behavior. If enabled (the default), the result set is closed after reading the last row.- Parameters:
autoClose
- the new value
-
getAutoClose
public boolean getAutoClose()Get the current auto-close behavior.- Returns:
- the auto-close value
-