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
Nested ClassesModifier and TypeClassDescriptionstatic classA 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_SENSITIVEFields inherited from interface java.sql.ResultSetMetaData
columnNoNulls, columnNullable, columnNullableUnknown -
Constructor Summary
ConstructorsConstructorDescriptionThis 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 TypeMethodDescriptionbooleanabsolute(int row) INTERNALvoidAdds a column to the result set.voidAdds a column to the result set.voidAdd a new row to the result set.voidINTERNALvoidMoves the current position to before the first row, that means the result set is reset.voidINTERNALvoidINTERNALvoidclose()Closes the result set and releases the resources.voidINTERNALintfindColumn(String columnLabel) Searches for a specific column in the result set.booleanfirst()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) INTERNALbooleanGet 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.booleangetBoolean(int columnIndex) Returns the value as a boolean.booleangetBoolean(String columnLabel) Returns the value as a boolean.bytegetByte(int columnIndex) Returns the value as a byte.byteReturns 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.intReturns the column count.intgetColumnDisplaySize(int columnIndex) Returns 15.getColumnLabel(int columnIndex) Returns the column label.getColumnName(int columnIndex) Returns the column name.intgetColumnType(int columnIndex) Returns the SQL type.getColumnTypeName(int columnIndex) Returns the data type name of a column.intReturns ResultSet.CONCUR_READ_ONLY.INTERNALgetDate(int columnIndex) Returns the value as an java.sql.Date.INTERNALReturns the value as a java.sql.Date.INTERNALdoublegetDouble(int columnIndex) Returns the value as an double.doubleReturns the value as a double.intReturns ResultSet.FETCH_FORWARD.intReturns 0.floatgetFloat(int columnIndex) Returns the value as a float.floatReturns the value as a float.intReturns the current result set holdability.intgetInt(int columnIndex) Returns the value as an int.intReturns the value as an int.longgetLong(int columnIndex) Returns the value as a long.longReturns 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> TReturns the value as an Object of the specified type.INTERNALReturns the value as an Object.<T> TReturns the value as an Object of the specified type.INTERNALintgetPrecision(int columnIndex) Returns the precision.getRef(int columnIndex) INTERNALINTERNALintgetRow()Returns the row number (1, 2,...) or 0 for no row.getRowId(int columnIndex) INTERNALINTERNALintgetScale(int columnIndex) Returns the scale.getSchemaName(int columnIndex) Returns empty string.shortgetShort(int columnIndex) Returns the value as a short.shortReturns 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) INTERNALintgetType()Returns the result set type.getUnicodeStream(int columnIndex) Deprecated.INTERNALgetUnicodeStream(String columnLabel) Deprecated.INTERNALgetURL(int columnIndex) INTERNALINTERNALReturns null.voidINTERNALbooleanINTERNALbooleanisAutoIncrement(int columnIndex) Returns false.booleanINTERNALbooleanisCaseSensitive(int columnIndex) Returns true.booleanisClosed()Returns whether this result set has been closed.booleanisCurrency(int columnIndex) Returns false.booleanisDefinitelyWritable(int columnIndex) Returns false.booleanisFirst()INTERNALbooleanisLast()INTERNALintisNullable(int columnIndex) Returns ResultSetMetaData.columnNullableUnknown.booleanisReadOnly(int columnIndex) Returns true.booleanisSearchable(int columnIndex) Returns true.booleanisSigned(int columnIndex) Returns true.booleanisWrapperFor(Class<?> iface) Checks if unwrap can return an object of this class.booleanisWritable(int columnIndex) Returns false.booleanlast()INTERNALvoidINTERNALvoidINTERNALbooleannext()Moves the cursor to the next row of the result set.booleanprevious()INTERNALvoidINTERNALbooleanrelative(int offset) INTERNALbooleanINTERNALbooleanINTERNALbooleanINTERNALvoidsetAutoClose(boolean autoClose) Set the auto-close behavior.voidsetFetchDirection(int direction) INTERNALvoidsetFetchSize(int rows) INTERNAL<T> TReturn an object of this class if possible.voidupdateArray(int columnIndex, Array x) INTERNALvoidupdateArray(String columnLabel, Array x) INTERNALvoidupdateAsciiStream(int columnIndex, InputStream x) INTERNALvoidupdateAsciiStream(int columnIndex, InputStream x, int length) INTERNALvoidupdateAsciiStream(int columnIndex, InputStream x, long length) INTERNALvoidupdateAsciiStream(String columnLabel, InputStream x) INTERNALvoidupdateAsciiStream(String columnLabel, InputStream x, int length) INTERNALvoidupdateAsciiStream(String columnLabel, InputStream x, long length) INTERNALvoidupdateBigDecimal(int columnIndex, BigDecimal x) INTERNALvoidupdateBigDecimal(String columnLabel, BigDecimal x) INTERNALvoidupdateBinaryStream(int columnIndex, InputStream x) INTERNALvoidupdateBinaryStream(int columnIndex, InputStream x, int length) INTERNALvoidupdateBinaryStream(int columnIndex, InputStream x, long length) INTERNALvoidupdateBinaryStream(String columnLabel, InputStream x) INTERNALvoidupdateBinaryStream(String columnLabel, InputStream x, int length) INTERNALvoidupdateBinaryStream(String columnLabel, InputStream x, long length) INTERNALvoidupdateBlob(int columnIndex, InputStream x) INTERNALvoidupdateBlob(int columnIndex, InputStream x, long length) INTERNALvoidupdateBlob(int columnIndex, Blob x) INTERNALvoidupdateBlob(String columnLabel, InputStream x) INTERNALvoidupdateBlob(String columnLabel, InputStream x, long length) INTERNALvoidupdateBlob(String columnLabel, Blob x) INTERNALvoidupdateBoolean(int columnIndex, boolean x) INTERNALvoidupdateBoolean(String columnLabel, boolean x) INTERNALvoidupdateByte(int columnIndex, byte x) INTERNALvoidupdateByte(String columnLabel, byte x) INTERNALvoidupdateBytes(int columnIndex, byte[] x) INTERNALvoidupdateBytes(String columnLabel, byte[] x) INTERNALvoidupdateCharacterStream(int columnIndex, Reader x) INTERNALvoidupdateCharacterStream(int columnIndex, Reader x, int length) INTERNALvoidupdateCharacterStream(int columnIndex, Reader x, long length) INTERNALvoidupdateCharacterStream(String columnLabel, Reader x) INTERNALvoidupdateCharacterStream(String columnLabel, Reader x, int length) INTERNALvoidupdateCharacterStream(String columnLabel, Reader x, long length) INTERNALvoidupdateClob(int columnIndex, Reader x) INTERNALvoidupdateClob(int columnIndex, Reader x, long length) INTERNALvoidupdateClob(int columnIndex, Clob x) INTERNALvoidupdateClob(String columnLabel, Reader x) INTERNALvoidupdateClob(String columnLabel, Reader x, long length) INTERNALvoidupdateClob(String columnLabel, Clob x) INTERNALvoidupdateDate(int columnIndex, Date x) INTERNALvoidupdateDate(String columnLabel, Date x) INTERNALvoidupdateDouble(int columnIndex, double x) INTERNALvoidupdateDouble(String columnLabel, double x) INTERNALvoidupdateFloat(int columnIndex, float x) INTERNALvoidupdateFloat(String columnLabel, float x) INTERNALvoidupdateInt(int columnIndex, int x) INTERNALvoidINTERNALvoidupdateLong(int columnIndex, long x) INTERNALvoidupdateLong(String columnLabel, long x) INTERNALvoidupdateNCharacterStream(int columnIndex, Reader x) INTERNALvoidupdateNCharacterStream(int columnIndex, Reader x, long length) INTERNALvoidupdateNCharacterStream(String columnLabel, Reader x) INTERNALvoidupdateNCharacterStream(String columnLabel, Reader x, long length) INTERNALvoidupdateNClob(int columnIndex, Reader x) INTERNALvoidupdateNClob(int columnIndex, Reader x, long length) INTERNALvoidupdateNClob(int columnIndex, NClob x) INTERNALvoidupdateNClob(String columnLabel, Reader x) INTERNALvoidupdateNClob(String columnLabel, Reader x, long length) INTERNALvoidupdateNClob(String columnLabel, NClob x) INTERNALvoidupdateNString(int columnIndex, String x) INTERNALvoidupdateNString(String columnLabel, String x) INTERNALvoidupdateNull(int columnIndex) INTERNALvoidupdateNull(String columnLabel) INTERNALvoidupdateObject(int columnIndex, Object x) INTERNALvoidupdateObject(int columnIndex, Object x, int scale) INTERNALvoidupdateObject(String columnLabel, Object x) INTERNALvoidupdateObject(String columnLabel, Object x, int scale) INTERNALvoidINTERNALvoidINTERNALvoidINTERNALvoidupdateRowId(int columnIndex, RowId x) INTERNALvoidupdateRowId(String columnLabel, RowId x) INTERNALvoidupdateShort(int columnIndex, short x) INTERNALvoidupdateShort(String columnLabel, short x) INTERNALvoidupdateSQLXML(int columnIndex, SQLXML x) INTERNALvoidupdateSQLXML(String columnLabel, SQLXML x) INTERNALvoidupdateString(int columnIndex, String x) INTERNALvoidupdateString(String columnLabel, String x) INTERNALvoidupdateTime(int columnIndex, Time x) INTERNALvoidupdateTime(String columnLabel, Time x) INTERNALvoidupdateTimestamp(int columnIndex, Timestamp x) INTERNALvoidupdateTimestamp(String columnLabel, Timestamp x) INTERNALbooleanwasNull()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, waitMethods 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:
getConcurrencyin interfaceResultSet- Returns:
- CONCUR_READ_ONLY
-
getFetchDirection
public int getFetchDirection()Returns ResultSet.FETCH_FORWARD.- Specified by:
getFetchDirectionin interfaceResultSet- Returns:
- FETCH_FORWARD
-
getFetchSize
public int getFetchSize()Returns 0.- Specified by:
getFetchSizein 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceResultSet
-
next
Moves the cursor to the next row of the result set.- Specified by:
nextin 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:
beforeFirstin 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:
findColumnin 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:
getMetaDatain interfaceResultSet- Returns:
- this
-
getWarnings
Returns null.- Specified by:
getWarningsin interfaceResultSet- Returns:
- null
-
getStatement
Returns null.- Specified by:
getStatementin interfaceResultSet- Returns:
- null
-
clearWarnings
public void clearWarnings()INTERNAL- Specified by:
clearWarningsin interfaceResultSet
-
getArray
Returns the value as a java.sql.Array.- Specified by:
getArrayin interfaceResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getArray
Returns the value as a java.sql.Array.- Specified by:
getArrayin interfaceResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
SQLException
-
getAsciiStream
INTERNAL- Specified by:
getAsciiStreamin interfaceResultSet- Throws:
SQLException
-
getAsciiStream
INTERNAL- Specified by:
getAsciiStreamin interfaceResultSet- Throws:
SQLException
-
getBigDecimal
Returns the value as a java.math.BigDecimal.- Specified by:
getBigDecimalin interfaceResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getBigDecimal
Returns the value as a java.math.BigDecimal.- Specified by:
getBigDecimalin interfaceResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
SQLException
-
getBigDecimal
Deprecated.INTERNAL- Specified by:
getBigDecimalin interfaceResultSet- Throws:
SQLException
-
getBigDecimal
Deprecated.INTERNAL- Specified by:
getBigDecimalin interfaceResultSet- Throws:
SQLException
-
getBinaryStream
Returns the value as a java.io.InputStream.- Specified by:
getBinaryStreamin interfaceResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getBinaryStream
Returns the value as a java.io.InputStream.- Specified by:
getBinaryStreamin 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:
getBlobin 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:
getBlobin interfaceResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
SQLException
-
getBoolean
Returns the value as a boolean.- Specified by:
getBooleanin interfaceResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getBoolean
Returns the value as a boolean.- Specified by:
getBooleanin interfaceResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
SQLException
-
getByte
Returns the value as a byte.- Specified by:
getBytein interfaceResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getByte
Returns the value as a byte.- Specified by:
getBytein interfaceResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
SQLException
-
getBytes
Returns the value as a byte array.- Specified by:
getBytesin interfaceResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getBytes
Returns the value as a byte array.- Specified by:
getBytesin 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:
getCharacterStreamin 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:
getCharacterStreamin 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:
getClobin 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:
getClobin interfaceResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
SQLException
-
getDate
Returns the value as an java.sql.Date.- Specified by:
getDatein interfaceResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getDate
Returns the value as a java.sql.Date.- Specified by:
getDatein interfaceResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
SQLException
-
getDate
INTERNAL- Specified by:
getDatein interfaceResultSet- Throws:
SQLException
-
getDate
INTERNAL- Specified by:
getDatein interfaceResultSet- Throws:
SQLException
-
getDouble
Returns the value as an double.- Specified by:
getDoublein interfaceResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getDouble
Returns the value as a double.- Specified by:
getDoublein interfaceResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
SQLException
-
getFloat
Returns the value as a float.- Specified by:
getFloatin interfaceResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getFloat
Returns the value as a float.- Specified by:
getFloatin interfaceResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
SQLException
-
getInt
Returns the value as an int.- Specified by:
getIntin interfaceResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getInt
Returns the value as an int.- Specified by:
getIntin interfaceResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
SQLException
-
getLong
Returns the value as a long.- Specified by:
getLongin interfaceResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getLong
Returns the value as a long.- Specified by:
getLongin interfaceResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
SQLException
-
getNCharacterStream
INTERNAL- Specified by:
getNCharacterStreamin interfaceResultSet- Throws:
SQLException
-
getNCharacterStream
INTERNAL- Specified by:
getNCharacterStreamin interfaceResultSet- Throws:
SQLException
-
getNClob
INTERNAL- Specified by:
getNClobin interfaceResultSet- Throws:
SQLException
-
getNClob
INTERNAL- Specified by:
getNClobin interfaceResultSet- Throws:
SQLException
-
getNString
INTERNAL- Specified by:
getNStringin interfaceResultSet- Throws:
SQLException
-
getNString
INTERNAL- Specified by:
getNStringin interfaceResultSet- Throws:
SQLException
-
getObject
Returns the value as an Object.- Specified by:
getObjectin interfaceResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getObject
Returns the value as an Object.- Specified by:
getObjectin interfaceResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
SQLException
-
getObject
Returns the value as an Object of the specified type.- Specified by:
getObjectin 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:
getObjectin interfaceResultSet- Parameters:
columnName- the column nametype- the class of the returned value- Returns:
- the value
- Throws:
SQLException
-
getObject
INTERNAL- Specified by:
getObjectin interfaceResultSet- Throws:
SQLException
-
getObject
INTERNAL- Specified by:
getObjectin interfaceResultSet- Throws:
SQLException
-
getRef
INTERNAL- Specified by:
getRefin interfaceResultSet- Throws:
SQLException
-
getRef
INTERNAL- Specified by:
getRefin interfaceResultSet- Throws:
SQLException
-
getRowId
INTERNAL- Specified by:
getRowIdin interfaceResultSet- Throws:
SQLException
-
getRowId
INTERNAL- Specified by:
getRowIdin interfaceResultSet- Throws:
SQLException
-
getShort
Returns the value as a short.- Specified by:
getShortin interfaceResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getShort
Returns the value as a short.- Specified by:
getShortin interfaceResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
SQLException
-
getSQLXML
INTERNAL- Specified by:
getSQLXMLin interfaceResultSet- Throws:
SQLException
-
getSQLXML
INTERNAL- Specified by:
getSQLXMLin interfaceResultSet- Throws:
SQLException
-
getString
Returns the value as a String.- Specified by:
getStringin interfaceResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getString
Returns the value as a String.- Specified by:
getStringin interfaceResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
SQLException
-
getTime
Returns the value as an java.sql.Time.- Specified by:
getTimein interfaceResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getTime
Returns the value as a java.sql.Time.- Specified by:
getTimein interfaceResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
SQLException
-
getTime
INTERNAL- Specified by:
getTimein interfaceResultSet- Throws:
SQLException
-
getTime
INTERNAL- Specified by:
getTimein interfaceResultSet- Throws:
SQLException
-
getTimestamp
Returns the value as an java.sql.Timestamp.- Specified by:
getTimestampin interfaceResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
SQLException
-
getTimestamp
Returns the value as a java.sql.Timestamp.- Specified by:
getTimestampin interfaceResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
SQLException
-
getTimestamp
INTERNAL- Specified by:
getTimestampin interfaceResultSet- Throws:
SQLException
-
getTimestamp
INTERNAL- Specified by:
getTimestampin interfaceResultSet- Throws:
SQLException
-
getUnicodeStream
Deprecated.INTERNAL- Specified by:
getUnicodeStreamin interfaceResultSet- Throws:
SQLException
-
getUnicodeStream
Deprecated.INTERNAL- Specified by:
getUnicodeStreamin interfaceResultSet- Throws:
SQLException
-
getURL
INTERNAL- Specified by:
getURLin interfaceResultSet- Throws:
SQLException
-
getURL
INTERNAL- Specified by:
getURLin interfaceResultSet- Throws:
SQLException
-
updateArray
INTERNAL- Specified by:
updateArrayin interfaceResultSet- Throws:
SQLException
-
updateArray
INTERNAL- Specified by:
updateArrayin interfaceResultSet- Throws:
SQLException
-
updateAsciiStream
INTERNAL- Specified by:
updateAsciiStreamin interfaceResultSet- Throws:
SQLException
-
updateAsciiStream
INTERNAL- Specified by:
updateAsciiStreamin interfaceResultSet- Throws:
SQLException
-
updateAsciiStream
INTERNAL- Specified by:
updateAsciiStreamin interfaceResultSet- Throws:
SQLException
-
updateAsciiStream
INTERNAL- Specified by:
updateAsciiStreamin interfaceResultSet- Throws:
SQLException
-
updateAsciiStream
INTERNAL- Specified by:
updateAsciiStreamin interfaceResultSet- Throws:
SQLException
-
updateAsciiStream
INTERNAL- Specified by:
updateAsciiStreamin interfaceResultSet- Throws:
SQLException
-
updateBigDecimal
INTERNAL- Specified by:
updateBigDecimalin interfaceResultSet- Throws:
SQLException
-
updateBigDecimal
INTERNAL- Specified by:
updateBigDecimalin interfaceResultSet- Throws:
SQLException
-
updateBinaryStream
INTERNAL- Specified by:
updateBinaryStreamin interfaceResultSet- Throws:
SQLException
-
updateBinaryStream
INTERNAL- Specified by:
updateBinaryStreamin interfaceResultSet- Throws:
SQLException
-
updateBinaryStream
INTERNAL- Specified by:
updateBinaryStreamin interfaceResultSet- Throws:
SQLException
-
updateBinaryStream
INTERNAL- Specified by:
updateBinaryStreamin interfaceResultSet- Throws:
SQLException
-
updateBinaryStream
INTERNAL- Specified by:
updateBinaryStreamin interfaceResultSet- Throws:
SQLException
-
updateBinaryStream
INTERNAL- Specified by:
updateBinaryStreamin interfaceResultSet- Throws:
SQLException
-
updateBlob
INTERNAL- Specified by:
updateBlobin interfaceResultSet- Throws:
SQLException
-
updateBlob
INTERNAL- Specified by:
updateBlobin interfaceResultSet- Throws:
SQLException
-
updateBlob
INTERNAL- Specified by:
updateBlobin interfaceResultSet- Throws:
SQLException
-
updateBlob
INTERNAL- Specified by:
updateBlobin interfaceResultSet- Throws:
SQLException
-
updateBlob
INTERNAL- Specified by:
updateBlobin interfaceResultSet- Throws:
SQLException
-
updateBlob
INTERNAL- Specified by:
updateBlobin interfaceResultSet- Throws:
SQLException
-
updateBoolean
INTERNAL- Specified by:
updateBooleanin interfaceResultSet- Throws:
SQLException
-
updateBoolean
INTERNAL- Specified by:
updateBooleanin interfaceResultSet- Throws:
SQLException
-
updateByte
INTERNAL- Specified by:
updateBytein interfaceResultSet- Throws:
SQLException
-
updateByte
INTERNAL- Specified by:
updateBytein interfaceResultSet- Throws:
SQLException
-
updateBytes
INTERNAL- Specified by:
updateBytesin interfaceResultSet- Throws:
SQLException
-
updateBytes
INTERNAL- Specified by:
updateBytesin interfaceResultSet- Throws:
SQLException
-
updateCharacterStream
INTERNAL- Specified by:
updateCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateCharacterStream
INTERNAL- Specified by:
updateCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateCharacterStream
INTERNAL- Specified by:
updateCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateCharacterStream
INTERNAL- Specified by:
updateCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateCharacterStream
INTERNAL- Specified by:
updateCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateCharacterStream
INTERNAL- Specified by:
updateCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateClob
INTERNAL- Specified by:
updateClobin interfaceResultSet- Throws:
SQLException
-
updateClob
INTERNAL- Specified by:
updateClobin interfaceResultSet- Throws:
SQLException
-
updateClob
INTERNAL- Specified by:
updateClobin interfaceResultSet- Throws:
SQLException
-
updateClob
INTERNAL- Specified by:
updateClobin interfaceResultSet- Throws:
SQLException
-
updateClob
INTERNAL- Specified by:
updateClobin interfaceResultSet- Throws:
SQLException
-
updateClob
INTERNAL- Specified by:
updateClobin interfaceResultSet- Throws:
SQLException
-
updateDate
INTERNAL- Specified by:
updateDatein interfaceResultSet- Throws:
SQLException
-
updateDate
INTERNAL- Specified by:
updateDatein interfaceResultSet- Throws:
SQLException
-
updateDouble
INTERNAL- Specified by:
updateDoublein interfaceResultSet- Throws:
SQLException
-
updateDouble
INTERNAL- Specified by:
updateDoublein interfaceResultSet- Throws:
SQLException
-
updateFloat
INTERNAL- Specified by:
updateFloatin interfaceResultSet- Throws:
SQLException
-
updateFloat
INTERNAL- Specified by:
updateFloatin interfaceResultSet- Throws:
SQLException
-
updateInt
INTERNAL- Specified by:
updateIntin interfaceResultSet- Throws:
SQLException
-
updateInt
INTERNAL- Specified by:
updateIntin interfaceResultSet- Throws:
SQLException
-
updateLong
INTERNAL- Specified by:
updateLongin interfaceResultSet- Throws:
SQLException
-
updateLong
INTERNAL- Specified by:
updateLongin interfaceResultSet- Throws:
SQLException
-
updateNCharacterStream
INTERNAL- Specified by:
updateNCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateNCharacterStream
INTERNAL- Specified by:
updateNCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateNCharacterStream
INTERNAL- Specified by:
updateNCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateNCharacterStream
INTERNAL- Specified by:
updateNCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateNClob
INTERNAL- Specified by:
updateNClobin interfaceResultSet- Throws:
SQLException
-
updateNClob
INTERNAL- Specified by:
updateNClobin interfaceResultSet- Throws:
SQLException
-
updateNClob
INTERNAL- Specified by:
updateNClobin interfaceResultSet- Throws:
SQLException
-
updateNClob
INTERNAL- Specified by:
updateNClobin interfaceResultSet- Throws:
SQLException
-
updateNClob
INTERNAL- Specified by:
updateNClobin interfaceResultSet- Throws:
SQLException
-
updateNClob
INTERNAL- Specified by:
updateNClobin interfaceResultSet- Throws:
SQLException
-
updateNString
INTERNAL- Specified by:
updateNStringin interfaceResultSet- Throws:
SQLException
-
updateNString
INTERNAL- Specified by:
updateNStringin interfaceResultSet- Throws:
SQLException
-
updateNull
INTERNAL- Specified by:
updateNullin interfaceResultSet- Throws:
SQLException
-
updateNull
INTERNAL- Specified by:
updateNullin interfaceResultSet- Throws:
SQLException
-
updateObject
INTERNAL- Specified by:
updateObjectin interfaceResultSet- Throws:
SQLException
-
updateObject
INTERNAL- Specified by:
updateObjectin interfaceResultSet- Throws:
SQLException
-
updateObject
INTERNAL- Specified by:
updateObjectin interfaceResultSet- Throws:
SQLException
-
updateObject
INTERNAL- Specified by:
updateObjectin interfaceResultSet- Throws:
SQLException
-
updateRef
INTERNAL- Specified by:
updateRefin interfaceResultSet- Throws:
SQLException
-
updateRef
INTERNAL- Specified by:
updateRefin interfaceResultSet- Throws:
SQLException
-
updateRowId
INTERNAL- Specified by:
updateRowIdin interfaceResultSet- Throws:
SQLException
-
updateRowId
INTERNAL- Specified by:
updateRowIdin interfaceResultSet- Throws:
SQLException
-
updateShort
INTERNAL- Specified by:
updateShortin interfaceResultSet- Throws:
SQLException
-
updateShort
INTERNAL- Specified by:
updateShortin interfaceResultSet- Throws:
SQLException
-
updateSQLXML
INTERNAL- Specified by:
updateSQLXMLin interfaceResultSet- Throws:
SQLException
-
updateSQLXML
INTERNAL- Specified by:
updateSQLXMLin interfaceResultSet- Throws:
SQLException
-
updateString
INTERNAL- Specified by:
updateStringin interfaceResultSet- Throws:
SQLException
-
updateString
INTERNAL- Specified by:
updateStringin interfaceResultSet- Throws:
SQLException
-
updateTime
INTERNAL- Specified by:
updateTimein interfaceResultSet- Throws:
SQLException
-
updateTime
INTERNAL- Specified by:
updateTimein interfaceResultSet- Throws:
SQLException
-
updateTimestamp
INTERNAL- Specified by:
updateTimestampin interfaceResultSet- Throws:
SQLException
-
updateTimestamp
INTERNAL- Specified by:
updateTimestampin interfaceResultSet- Throws:
SQLException
-
getColumnCount
public int getColumnCount()Returns the column count.- Specified by:
getColumnCountin interfaceResultSetMetaData- Returns:
- the column count
-
getColumnDisplaySize
public int getColumnDisplaySize(int columnIndex) Returns 15.- Specified by:
getColumnDisplaySizein interfaceResultSetMetaData- Parameters:
columnIndex- (1,2,...)- Returns:
- 15
-
getColumnType
Returns the SQL type.- Specified by:
getColumnTypein interfaceResultSetMetaData- Parameters:
columnIndex- (1,2,...)- Returns:
- the SQL type
- Throws:
SQLException
-
getPrecision
Returns the precision.- Specified by:
getPrecisionin interfaceResultSetMetaData- Parameters:
columnIndex- (1,2,...)- Returns:
- the precision
- Throws:
SQLException
-
getScale
Returns the scale.- Specified by:
getScalein interfaceResultSetMetaData- Parameters:
columnIndex- (1,2,...)- Returns:
- the scale
- Throws:
SQLException
-
isNullable
public int isNullable(int columnIndex) Returns ResultSetMetaData.columnNullableUnknown.- Specified by:
isNullablein interfaceResultSetMetaData- Parameters:
columnIndex- (1,2,...)- Returns:
- columnNullableUnknown
-
isAutoIncrement
public boolean isAutoIncrement(int columnIndex) Returns false.- Specified by:
isAutoIncrementin interfaceResultSetMetaData- Parameters:
columnIndex- (1,2,...)- Returns:
- false
-
isCaseSensitive
public boolean isCaseSensitive(int columnIndex) Returns true.- Specified by:
isCaseSensitivein interfaceResultSetMetaData- Parameters:
columnIndex- (1,2,...)- Returns:
- true
-
isCurrency
public boolean isCurrency(int columnIndex) Returns false.- Specified by:
isCurrencyin interfaceResultSetMetaData- Parameters:
columnIndex- (1,2,...)- Returns:
- false
-
isDefinitelyWritable
public boolean isDefinitelyWritable(int columnIndex) Returns false.- Specified by:
isDefinitelyWritablein interfaceResultSetMetaData- Parameters:
columnIndex- (1,2,...)- Returns:
- false
-
isReadOnly
public boolean isReadOnly(int columnIndex) Returns true.- Specified by:
isReadOnlyin interfaceResultSetMetaData- Parameters:
columnIndex- (1,2,...)- Returns:
- true
-
isSearchable
public boolean isSearchable(int columnIndex) Returns true.- Specified by:
isSearchablein interfaceResultSetMetaData- Parameters:
columnIndex- (1,2,...)- Returns:
- true
-
isSigned
public boolean isSigned(int columnIndex) Returns true.- Specified by:
isSignedin interfaceResultSetMetaData- Parameters:
columnIndex- (1,2,...)- Returns:
- true
-
isWritable
public boolean isWritable(int columnIndex) Returns false.- Specified by:
isWritablein interfaceResultSetMetaData- Parameters:
columnIndex- (1,2,...)- Returns:
- false
-
getCatalogName
Returns empty string.- Specified by:
getCatalogNamein interfaceResultSetMetaData- Parameters:
columnIndex- (1,2,...)- Returns:
- empty string
-
getColumnClassName
Returns the Java class name if this column.- Specified by:
getColumnClassNamein interfaceResultSetMetaData- Parameters:
columnIndex- (1,2,...)- Returns:
- the class name
- Throws:
SQLException
-
getColumnLabel
Returns the column label.- Specified by:
getColumnLabelin interfaceResultSetMetaData- Parameters:
columnIndex- (1,2,...)- Returns:
- the column label
- Throws:
SQLException
-
getColumnName
Returns the column name.- Specified by:
getColumnNamein interfaceResultSetMetaData- Parameters:
columnIndex- (1,2,...)- Returns:
- the column name
- Throws:
SQLException
-
getColumnTypeName
Returns the data type name of a column.- Specified by:
getColumnTypeNamein interfaceResultSetMetaData- Parameters:
columnIndex- (1,2,...)- Returns:
- the type name
- Throws:
SQLException
-
getSchemaName
Returns empty string.- Specified by:
getSchemaNamein interfaceResultSetMetaData- Parameters:
columnIndex- (1,2,...)- Returns:
- empty string
-
getTableName
Returns empty string.- Specified by:
getTableNamein interfaceResultSetMetaData- Parameters:
columnIndex- (1,2,...)- Returns:
- empty string
-
afterLast
INTERNAL- Specified by:
afterLastin interfaceResultSet- Throws:
SQLException
-
cancelRowUpdates
INTERNAL- Specified by:
cancelRowUpdatesin interfaceResultSet- Throws:
SQLException
-
deleteRow
INTERNAL- Specified by:
deleteRowin interfaceResultSet- Throws:
SQLException
-
insertRow
INTERNAL- Specified by:
insertRowin interfaceResultSet- Throws:
SQLException
-
moveToCurrentRow
INTERNAL- Specified by:
moveToCurrentRowin interfaceResultSet- Throws:
SQLException
-
moveToInsertRow
INTERNAL- Specified by:
moveToInsertRowin interfaceResultSet- Throws:
SQLException
-
refreshRow
INTERNAL- Specified by:
refreshRowin interfaceResultSet- Throws:
SQLException
-
updateRow
INTERNAL- Specified by:
updateRowin interfaceResultSet- Throws:
SQLException
-
first
INTERNAL- Specified by:
firstin interfaceResultSet- Throws:
SQLException
-
isAfterLast
INTERNAL- Specified by:
isAfterLastin interfaceResultSet- Throws:
SQLException
-
isBeforeFirst
INTERNAL- Specified by:
isBeforeFirstin interfaceResultSet- Throws:
SQLException
-
isFirst
INTERNAL- Specified by:
isFirstin interfaceResultSet- Throws:
SQLException
-
isLast
INTERNAL- Specified by:
isLastin interfaceResultSet- Throws:
SQLException
-
last
INTERNAL- Specified by:
lastin interfaceResultSet- Throws:
SQLException
-
previous
INTERNAL- Specified by:
previousin interfaceResultSet- Throws:
SQLException
-
rowDeleted
INTERNAL- Specified by:
rowDeletedin interfaceResultSet- Throws:
SQLException
-
rowInserted
INTERNAL- Specified by:
rowInsertedin interfaceResultSet- Throws:
SQLException
-
rowUpdated
INTERNAL- Specified by:
rowUpdatedin interfaceResultSet- Throws:
SQLException
-
setFetchDirection
INTERNAL- Specified by:
setFetchDirectionin interfaceResultSet- Throws:
SQLException
-
setFetchSize
INTERNAL- Specified by:
setFetchSizein interfaceResultSet- Throws:
SQLException
-
absolute
INTERNAL- Specified by:
absolutein interfaceResultSet- Throws:
SQLException
-
relative
INTERNAL- Specified by:
relativein interfaceResultSet- Throws:
SQLException
-
getCursorName
INTERNAL- Specified by:
getCursorNamein interfaceResultSet- Throws:
SQLException
-
getHoldability
public int getHoldability()Returns the current result set holdability.- Specified by:
getHoldabilityin 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:
unwrapin interfaceWrapper- Parameters:
iface- the class- Returns:
- this
- Throws:
SQLException
-
isWrapperFor
Checks if unwrap can return an object of this class.- Specified by:
isWrapperForin 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
-