Class JdbcResultSet
- java.lang.Object
-
- org.h2.message.TraceObject
-
- org.h2.jdbc.JdbcResultSet
-
- All Implemented Interfaces:
java.lang.AutoCloseable,java.sql.ResultSet,java.sql.Wrapper
public final class JdbcResultSet extends TraceObject implements java.sql.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 Summary
Fields Modifier and Type Field Description private intcolumnCountprivate java.util.HashMap<java.lang.String,java.lang.Integer>columnLabelMapprivate CommandInterfacecommandprivate JdbcConnectionconnprivate Value[]insertRowprivate java.util.HashMap<java.lang.Long,Value[]>patchedRowsprivate JdbcPreparedStatementpreparedStatement(package private) ResultInterfaceresultprivate booleanscrollableprivate JdbcStatementstatprivate booleantriggerUpdatableprivate booleanupdatableprivate Value[]updateRowprivate booleanwasNull-
Fields inherited from class org.h2.message.TraceObject
ARRAY, BLOB, CALLABLE_STATEMENT, CLOB, CONNECTION, DATA_SOURCE, DATABASE_META_DATA, PARAMETER_META_DATA, PREPARED_STATEMENT, RESULT_SET, RESULT_SET_META_DATA, SAVEPOINT, SQLXML, STATEMENT, trace, XA_DATA_SOURCE, XID
-
-
Constructor Summary
Constructors Constructor Description JdbcResultSet(JdbcConnection conn, JdbcPreparedStatement preparedStatement, CommandInterface command, ResultInterface result, int id, boolean scrollable, boolean updatable, java.util.HashMap<java.lang.String,java.lang.Integer> columnLabelMap)JdbcResultSet(JdbcConnection conn, JdbcStatement stat, CommandInterface command, ResultInterface result, int id, boolean scrollable, boolean updatable, boolean triggerUpdatable)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanabsolute(int rowNumber)Moves the current position to a specific row.voidafterLast()Moves the current position to after the last row, that means after the end.voidbeforeFirst()Moves the current position to before the first row, that means resets the result set.voidcancelRowUpdates()Cancels updating a row.(package private) voidcheckClosed()Check if this result set is closed.private intcheckColumnIndex(int columnIndex)private voidcheckOnValidRow()private voidcheckUpdatable()voidclearWarnings()Clears all warnings.voidclose()Closes the result set.(package private) voidcloseInternal(boolean fromStatement)Close the result set.private ValueconvertToUnknownValue(java.lang.Object x)private ValueconvertToValue(java.lang.Object x, java.sql.SQLType targetSqlType)voiddeleteRow()Deletes the current row.intfindColumn(java.lang.String columnLabel)Searches for a specific column in the result set.booleanfirst()Moves the current position to the first row.private Valueget(int columnIndex)java.sql.ArraygetArray(int columnIndex)Returns the value of the specified column as an Array.private java.sql.ArraygetArray(int id, int columnIndex)java.sql.ArraygetArray(java.lang.String columnLabel)Returns the value of the specified column as an Array.java.io.InputStreamgetAsciiStream(int columnIndex)Returns the value of the specified column as an input stream.java.io.InputStreamgetAsciiStream(java.lang.String columnLabel)Returns the value of the specified column as an input stream.java.math.BigDecimalgetBigDecimal(int columnIndex)Returns the value of the specified column as a BigDecimal.java.math.BigDecimalgetBigDecimal(int columnIndex, int scale)Deprecated.java.math.BigDecimalgetBigDecimal(java.lang.String columnLabel)Returns the value of the specified column as a BigDecimal.java.math.BigDecimalgetBigDecimal(java.lang.String columnLabel, int scale)Deprecated.java.io.InputStreamgetBinaryStream(int columnIndex)Returns the value of the specified column as an input stream.java.io.InputStreamgetBinaryStream(java.lang.String columnLabel)Returns the value of the specified column as an input stream.java.sql.BlobgetBlob(int columnIndex)Returns the value of the specified column as a Blob.private JdbcBlobgetBlob(int id, int columnIndex)java.sql.BlobgetBlob(java.lang.String columnLabel)Returns the value of the specified column as a Blob.booleangetBoolean(int columnIndex)Returns the value of the specified column as a boolean.booleangetBoolean(java.lang.String columnLabel)Returns the value of the specified column as a boolean.private booleangetBooleanInternal(int columnIndex)bytegetByte(int columnIndex)Returns the value of the specified column as a byte.bytegetByte(java.lang.String columnLabel)Returns the value of the specified column as a byte.private bytegetByteInternal(int columnIndex)byte[]getBytes(int columnIndex)Returns the value of the specified column as a byte array.byte[]getBytes(java.lang.String columnLabel)Returns the value of the specified column as a byte array.java.io.ReadergetCharacterStream(int columnIndex)Returns the value of the specified column as a reader.java.io.ReadergetCharacterStream(java.lang.String columnLabel)Returns the value of the specified column as a reader.java.sql.ClobgetClob(int columnIndex)Returns the value of the specified column as a Clob.private JdbcClobgetClob(int id, int columnIndex)java.sql.ClobgetClob(java.lang.String columnLabel)Returns the value of the specified column as a Clob.private intgetColumnIndex(java.lang.String columnLabel)intgetConcurrency()Gets the result set concurrency.java.lang.StringgetCursorName()[Not supported] Gets the cursor name if it was defined.java.sql.DategetDate(int columnIndex)Returns the value of the specified column as a java.sql.Date.java.sql.DategetDate(int columnIndex, java.util.Calendar calendar)Returns the value of the specified column as a java.sql.Date using a specified time zone.java.sql.DategetDate(java.lang.String columnLabel)Returns the value of the specified column as a java.sql.Date.java.sql.DategetDate(java.lang.String columnLabel, java.util.Calendar calendar)Returns the value of the specified column as a java.sql.Date using a specified time zone.doublegetDouble(int columnIndex)Returns the value of the specified column as a double.doublegetDouble(java.lang.String columnLabel)Returns the value of the specified column as a double.private doublegetDoubleInternal(int columnIndex)intgetFetchDirection()Gets the fetch direction.intgetFetchSize()Gets the number of rows suggested to read in one step.floatgetFloat(int columnIndex)Returns the value of the specified column as a float.floatgetFloat(java.lang.String columnLabel)Returns the value of the specified column as a float.private floatgetFloatInternal(int columnIndex)intgetHoldability()Returns the current result set holdability.intgetInt(int columnIndex)Returns the value of the specified column as an int.intgetInt(java.lang.String columnLabel)Returns the value of the specified column as an int.ValuegetInternal(int columnIndex)INTERNALprivate intgetIntInternal(int columnIndex)longgetLong(int columnIndex)Returns the value of the specified column as a long.longgetLong(java.lang.String columnLabel)Returns the value of the specified column as a long.private longgetLongInternal(int columnIndex)java.sql.ResultSetMetaDatagetMetaData()Gets the meta data of this result set.java.io.ReadergetNCharacterStream(int columnIndex)Returns the value of the specified column as a reader.java.io.ReadergetNCharacterStream(java.lang.String columnLabel)Returns the value of the specified column as a reader.java.sql.NClobgetNClob(int columnIndex)Returns the value of the specified column as a Clob.java.sql.NClobgetNClob(java.lang.String columnLabel)Returns the value of the specified column as a Clob.java.lang.StringgetNString(int columnIndex)Returns the value of the specified column as a String.java.lang.StringgetNString(java.lang.String columnLabel)Returns the value of the specified column as a String.java.lang.ObjectgetObject(int columnIndex)Returns a column value as a Java object.<T> TgetObject(int columnIndex, java.lang.Class<T> type)Returns a column value as a Java object of the specified type.java.lang.ObjectgetObject(int columnIndex, java.util.Map<java.lang.String,java.lang.Class<?>> map)[Not supported] Gets a column as a object using the specified type mapping.java.lang.ObjectgetObject(java.lang.String columnLabel)Returns a column value as a Java object.<T> TgetObject(java.lang.String columnName, java.lang.Class<T> type)Returns a column value as a Java object of the specified type.java.lang.ObjectgetObject(java.lang.String columnLabel, java.util.Map<java.lang.String,java.lang.Class<?>> map)[Not supported] Gets a column as a object using the specified type mapping.java.sql.RefgetRef(int columnIndex)[Not supported] Gets a column as a reference.java.sql.RefgetRef(java.lang.String columnLabel)[Not supported] Gets a column as a reference.ResultInterfacegetResult()INTERNALintgetRow()Gets the current row number.java.sql.RowIdgetRowId(int columnIndex)[Not supported] Returns the value of the specified column as a row id.java.sql.RowIdgetRowId(java.lang.String columnLabel)[Not supported] Returns the value of the specified column as a row id.shortgetShort(int columnIndex)Returns the value of the specified column as a short.shortgetShort(java.lang.String columnLabel)Returns the value of the specified column as a short.private shortgetShortInternal(int columnIndex)java.sql.SQLXMLgetSQLXML(int columnIndex)Returns the value of the specified column as a SQLXML.java.sql.SQLXMLgetSQLXML(java.lang.String columnLabel)Returns the value of the specified column as a SQLXML.java.sql.StatementgetStatement()Returns the statement that created this object.java.lang.StringgetString(int columnIndex)Returns the value of the specified column as a String.java.lang.StringgetString(java.lang.String columnLabel)Returns the value of the specified column as a String.java.sql.TimegetTime(int columnIndex)Returns the value of the specified column as a java.sql.Time.java.sql.TimegetTime(int columnIndex, java.util.Calendar calendar)Returns the value of the specified column as a java.sql.Time using a specified time zone.java.sql.TimegetTime(java.lang.String columnLabel)Returns the value of the specified column as a java.sql.Time.java.sql.TimegetTime(java.lang.String columnLabel, java.util.Calendar calendar)Returns the value of the specified column as a java.sql.Time using a specified time zone.java.sql.TimestampgetTimestamp(int columnIndex)Returns the value of the specified column as a java.sql.Timestamp.java.sql.TimestampgetTimestamp(int columnIndex, java.util.Calendar calendar)Returns the value of the specified column as a java.sql.Timestamp using a specified time zone.java.sql.TimestampgetTimestamp(java.lang.String columnLabel)Returns the value of the specified column as a java.sql.Timestamp.java.sql.TimestampgetTimestamp(java.lang.String columnLabel, java.util.Calendar calendar)Returns the value of the specified column as a java.sql.Timestamp.intgetType()Get the result set type.java.io.InputStreamgetUnicodeStream(int columnIndex)Deprecated.since JDBC 2.0, use getCharacterStreamjava.io.InputStreamgetUnicodeStream(java.lang.String columnLabel)Deprecated.since JDBC 2.0, use setCharacterStreamprivate UpdatableRowgetUpdatableRow()Value[]getUpdateRow()INTERNALjava.net.URLgetURL(int columnIndex)[Not supported]java.net.URLgetURL(java.lang.String columnLabel)[Not supported]java.sql.SQLWarninggetWarnings()Gets the first warning reported by calls on this object.voidinsertRow()Inserts the current row.booleanisAfterLast()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.booleanisBeforeFirst()Checks if the current position is before the first row, that means next() was not called yet, and there is at least one row.booleanisClosed()Returns whether this result set is closed.booleanisFirst()Checks if the current position is row 1, that means next() was called once and returned true.booleanisLast()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.private booleanisOnValidRow()booleanisWrapperFor(java.lang.Class<?> iface)Checks if unwrap can return an object of this class.booleanlast()Moves the current position to the last row.voidmoveToCurrentRow()Moves the current position to the current row.voidmoveToInsertRow()Moves the current position to the insert row.booleannext()Moves the cursor to the next row of the result set.private booleannextLazyRow()private booleannextRow()private voidpatchCurrentRow(Value[] row)booleanprevious()Moves the cursor to the last row, or row before first row if the current position is the first row.voidrefreshRow()Re-reads the current row from the database.booleanrelative(int rowCount)Moves the current position to a specific row relative to the current row.private voidresetResult()booleanrowDeleted()Detects if the row was deleted (by somebody else or the caller).booleanrowInserted()Detects if the row was inserted.booleanrowUpdated()Detects if the row was updated (by somebody else or the caller).voidsetFetchDirection(int direction)[Not supported] Sets (changes) the fetch direction for this result set.voidsetFetchSize(int rows)Sets the number of rows suggested to read in one step.java.lang.StringtoString()INTERNAL<T> Tunwrap(java.lang.Class<T> iface)Return an object of this class if possible.private voidupdate(int columnIndex, Value v)voidupdateArray(int columnIndex, java.sql.Array x)Updates a column in the current or insert row.voidupdateArray(java.lang.String columnLabel, java.sql.Array x)Updates a column in the current or insert row.private voidupdateArrayImpl(int columnIndex, java.sql.Array x)private voidupdateAscii(int columnIndex, java.io.InputStream x, long length)voidupdateAsciiStream(int columnIndex, java.io.InputStream x)Updates a column in the current or insert row.voidupdateAsciiStream(int columnIndex, java.io.InputStream x, int length)Updates a column in the current or insert row.voidupdateAsciiStream(int columnIndex, java.io.InputStream x, long length)Updates a column in the current or insert row.voidupdateAsciiStream(java.lang.String columnLabel, java.io.InputStream x)Updates a column in the current or insert row.voidupdateAsciiStream(java.lang.String columnLabel, java.io.InputStream x, int length)Updates a column in the current or insert row.voidupdateAsciiStream(java.lang.String columnLabel, java.io.InputStream x, long length)Updates a column in the current or insert row.voidupdateBigDecimal(int columnIndex, java.math.BigDecimal x)Updates a column in the current or insert row.voidupdateBigDecimal(java.lang.String columnLabel, java.math.BigDecimal x)Updates a column in the current or insert row.voidupdateBinaryStream(int columnIndex, java.io.InputStream x)Updates a column in the current or insert row.voidupdateBinaryStream(int columnIndex, java.io.InputStream x, int length)Updates a column in the current or insert row.voidupdateBinaryStream(int columnIndex, java.io.InputStream x, long length)Updates a column in the current or insert row.voidupdateBinaryStream(java.lang.String columnLabel, java.io.InputStream x)Updates a column in the current or insert row.voidupdateBinaryStream(java.lang.String columnLabel, java.io.InputStream x, int length)Updates a column in the current or insert row.voidupdateBinaryStream(java.lang.String columnLabel, java.io.InputStream x, long length)Updates a column in the current or insert row.voidupdateBlob(int columnIndex, java.io.InputStream x)Updates a column in the current or insert row.voidupdateBlob(int columnIndex, java.io.InputStream x, long length)Updates a column in the current or insert row.voidupdateBlob(int columnIndex, java.sql.Blob x)Updates a column in the current or insert row.voidupdateBlob(java.lang.String columnLabel, java.io.InputStream x)Updates a column in the current or insert row.voidupdateBlob(java.lang.String columnLabel, java.io.InputStream x, long length)Updates a column in the current or insert row.voidupdateBlob(java.lang.String columnLabel, java.sql.Blob x)Updates a column in the current or insert row.private voidupdateBlobImpl(int columnIndex, java.io.InputStream x, long length)private voidupdateBlobImpl(int columnIndex, java.sql.Blob x, long length)voidupdateBoolean(int columnIndex, boolean x)Updates a column in the current or insert row.voidupdateBoolean(java.lang.String columnLabel, boolean x)Updates a column in the current or insert row.voidupdateByte(int columnIndex, byte x)Updates a column in the current or insert row.voidupdateByte(java.lang.String columnLabel, byte x)Updates a column in the current or insert row.voidupdateBytes(int columnIndex, byte[] x)Updates a column in the current or insert row.voidupdateBytes(java.lang.String columnLabel, byte[] x)Updates a column in the current or insert row.voidupdateCharacterStream(int columnIndex, java.io.Reader x)Updates a column in the current or insert row.voidupdateCharacterStream(int columnIndex, java.io.Reader x, int length)Updates a column in the current or insert row.voidupdateCharacterStream(int columnIndex, java.io.Reader x, long length)Updates a column in the current or insert row.voidupdateCharacterStream(java.lang.String columnLabel, java.io.Reader x)Updates a column in the current or insert row.voidupdateCharacterStream(java.lang.String columnLabel, java.io.Reader x, int length)Updates a column in the current or insert row.voidupdateCharacterStream(java.lang.String columnLabel, java.io.Reader x, long length)Updates a column in the current or insert row.voidupdateClob(int columnIndex, java.io.Reader x)Updates a column in the current or insert row.voidupdateClob(int columnIndex, java.io.Reader x, long length)Updates a column in the current or insert row.voidupdateClob(int columnIndex, java.sql.Clob x)Updates a column in the current or insert row.voidupdateClob(java.lang.String columnLabel, java.io.Reader x)Updates a column in the current or insert row.voidupdateClob(java.lang.String columnLabel, java.io.Reader x, long length)Updates a column in the current or insert row.voidupdateClob(java.lang.String columnLabel, java.sql.Clob x)Updates a column in the current or insert row.private voidupdateClobImpl(int columnIndex, java.io.Reader x, long length)private voidupdateClobImpl(int columnIndex, java.sql.Clob x)voidupdateDate(int columnIndex, java.sql.Date x)Updates a column in the current or insert row.voidupdateDate(java.lang.String columnLabel, java.sql.Date x)Updates a column in the current or insert row.voidupdateDouble(int columnIndex, double x)Updates a column in the current or insert row.voidupdateDouble(java.lang.String columnLabel, double x)Updates a column in the current or insert row.voidupdateFloat(int columnIndex, float x)Updates a column in the current or insert row.voidupdateFloat(java.lang.String columnLabel, float x)Updates a column in the current or insert row.voidupdateInt(int columnIndex, int x)Updates a column in the current or insert row.voidupdateInt(java.lang.String columnLabel, int x)Updates a column in the current or insert row.voidupdateLong(int columnIndex, long x)Updates a column in the current or insert row.voidupdateLong(java.lang.String columnLabel, long x)Updates a column in the current or insert row.voidupdateNCharacterStream(int columnIndex, java.io.Reader x)Updates a column in the current or insert row.voidupdateNCharacterStream(int columnIndex, java.io.Reader x, long length)Updates a column in the current or insert row.voidupdateNCharacterStream(java.lang.String columnLabel, java.io.Reader x)Updates a column in the current or insert row.voidupdateNCharacterStream(java.lang.String columnLabel, java.io.Reader x, long length)Updates a column in the current or insert row.voidupdateNClob(int columnIndex, java.io.Reader x)Updates a column in the current or insert row.voidupdateNClob(int columnIndex, java.io.Reader x, long length)Updates a column in the current or insert row.voidupdateNClob(int columnIndex, java.sql.NClob x)Updates a column in the current or insert row.voidupdateNClob(java.lang.String columnLabel, java.io.Reader x)Updates a column in the current or insert row.voidupdateNClob(java.lang.String columnLabel, java.io.Reader x, long length)Updates a column in the current or insert row.voidupdateNClob(java.lang.String columnLabel, java.sql.NClob x)Updates a column in the current or insert row.voidupdateNString(int columnIndex, java.lang.String x)Updates a column in the current or insert row.voidupdateNString(java.lang.String columnLabel, java.lang.String x)Updates a column in the current or insert row.voidupdateNull(int columnIndex)Updates a column in the current or insert row.voidupdateNull(java.lang.String columnLabel)Updates a column in the current or insert row.voidupdateObject(int columnIndex, java.lang.Object x)Updates a column in the current or insert row.voidupdateObject(int columnIndex, java.lang.Object x, int scale)Updates a column in the current or insert row.voidupdateObject(int columnIndex, java.lang.Object x, java.sql.SQLType targetSqlType)Updates a column in the current or insert row.voidupdateObject(int columnIndex, java.lang.Object x, java.sql.SQLType targetSqlType, int scaleOrLength)Updates a column in the current or insert row.voidupdateObject(java.lang.String columnLabel, java.lang.Object x)Updates a column in the current or insert row.voidupdateObject(java.lang.String columnLabel, java.lang.Object x, int scale)Updates a column in the current or insert row.voidupdateObject(java.lang.String columnLabel, java.lang.Object x, java.sql.SQLType targetSqlType)Updates a column in the current or insert row.voidupdateObject(java.lang.String columnLabel, java.lang.Object x, java.sql.SQLType targetSqlType, int scaleOrLength)Updates a column in the current or insert row.voidupdateRef(int columnIndex, java.sql.Ref x)[Not supported]voidupdateRef(java.lang.String columnLabel, java.sql.Ref x)[Not supported]voidupdateRow()Updates the current row.voidupdateRowId(int columnIndex, java.sql.RowId x)[Not supported] Updates a column in the current or insert row.voidupdateRowId(java.lang.String columnLabel, java.sql.RowId x)[Not supported] Updates a column in the current or insert row.voidupdateShort(int columnIndex, short x)Updates a column in the current or insert row.voidupdateShort(java.lang.String columnLabel, short x)Updates a column in the current or insert row.voidupdateSQLXML(int columnIndex, java.sql.SQLXML xmlObject)Updates a column in the current or insert row.voidupdateSQLXML(java.lang.String columnLabel, java.sql.SQLXML xmlObject)Updates a column in the current or insert row.private voidupdateSQLXMLImpl(int columnIndex, java.sql.SQLXML xmlObject)voidupdateString(int columnIndex, java.lang.String x)Updates a column in the current or insert row.voidupdateString(java.lang.String columnLabel, java.lang.String x)Updates a column in the current or insert row.voidupdateTime(int columnIndex, java.sql.Time x)Updates a column in the current or insert row.voidupdateTime(java.lang.String columnLabel, java.sql.Time x)Updates a column in the current or insert row.voidupdateTimestamp(int columnIndex, java.sql.Timestamp x)Updates a column in the current or insert row.voidupdateTimestamp(java.lang.String columnLabel, java.sql.Timestamp x)Updates a column in the current or insert row.booleanwasNull()Returns whether the last column accessed was null.-
Methods inherited from class org.h2.message.TraceObject
debugCode, debugCodeAssign, debugCodeCall, debugCodeCall, debugCodeCall, getNextId, getTraceId, getTraceObjectName, isDebugEnabled, isInfoEnabled, logAndConvert, quote, quoteArray, quoteBigDecimal, quoteBytes, quoteDate, quoteIntArray, quoteMap, quoteTime, quoteTimestamp, setTrace, unsupported
-
-
-
-
Field Detail
-
scrollable
private final boolean scrollable
-
updatable
private final boolean updatable
-
triggerUpdatable
private final boolean triggerUpdatable
-
result
ResultInterface 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 java.util.HashMap<java.lang.String,java.lang.Integer> columnLabelMap
-
patchedRows
private java.util.HashMap<java.lang.Long,Value[]> patchedRows
-
preparedStatement
private JdbcPreparedStatement preparedStatement
-
command
private final CommandInterface command
-
-
Constructor Detail
-
JdbcResultSet
public JdbcResultSet(JdbcConnection conn, JdbcStatement stat, CommandInterface command, ResultInterface result, int id, boolean scrollable, boolean updatable, boolean triggerUpdatable)
-
JdbcResultSet
JdbcResultSet(JdbcConnection conn, JdbcPreparedStatement preparedStatement, CommandInterface command, ResultInterface result, int id, boolean scrollable, boolean updatable, java.util.HashMap<java.lang.String,java.lang.Integer> columnLabelMap)
-
-
Method Detail
-
next
public boolean next() throws java.sql.SQLExceptionMoves the cursor to the next row of the result set.- Specified by:
nextin interfacejava.sql.ResultSet- Returns:
- true if successful, false if there are no more rows
- Throws:
java.sql.SQLException
-
getMetaData
public java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLExceptionGets the meta data of this result set.- Specified by:
getMetaDatain interfacejava.sql.ResultSet- Returns:
- the meta data
- Throws:
java.sql.SQLException
-
wasNull
public boolean wasNull() throws java.sql.SQLExceptionReturns whether the last column accessed was null.- Specified by:
wasNullin interfacejava.sql.ResultSet- Returns:
- true if the last column accessed was null
- Throws:
java.sql.SQLException
-
findColumn
public int findColumn(java.lang.String columnLabel) throws java.sql.SQLExceptionSearches for a specific column in the result set. A case-insensitive search is made.- Specified by:
findColumnin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the column index (1,2,...)
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
close
public void close() throws java.sql.SQLExceptionCloses the result set.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.sql.ResultSet- Throws:
java.sql.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 java.sql.Statement getStatement() throws java.sql.SQLExceptionReturns the statement that created this object.- Specified by:
getStatementin interfacejava.sql.ResultSet- Returns:
- the statement or prepared statement, or null if created by a DatabaseMetaData call.
- Throws:
java.sql.SQLException
-
getWarnings
public java.sql.SQLWarning getWarnings() throws java.sql.SQLExceptionGets the first warning reported by calls on this object.- Specified by:
getWarningsin interfacejava.sql.ResultSet- Returns:
- null
- Throws:
java.sql.SQLException
-
clearWarnings
public void clearWarnings() throws java.sql.SQLExceptionClears all warnings.- Specified by:
clearWarningsin interfacejava.sql.ResultSet- Throws:
java.sql.SQLException
-
getString
public java.lang.String getString(int columnIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a String.- Specified by:
getStringin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getString
public java.lang.String getString(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns the value of the specified column as a String.- Specified by:
getStringin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getInt
public int getInt(int columnIndex) throws java.sql.SQLExceptionReturns the value of the specified column as an int.- Specified by:
getIntin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getInt
public int getInt(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns the value of the specified column as an int.- Specified by:
getIntin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getIntInternal
private int getIntInternal(int columnIndex)
-
getBigDecimal
public java.math.BigDecimal getBigDecimal(int columnIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a BigDecimal.- Specified by:
getBigDecimalin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getDate
public java.sql.Date getDate(int columnIndex) throws java.sql.SQLExceptionReturns 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:
getDatein interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed- See Also:
getObject(int, Class)
-
getTime
public java.sql.Time getTime(int columnIndex) throws java.sql.SQLExceptionReturns 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:
getTimein interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed- See Also:
getObject(int, Class)
-
getTimestamp
public java.sql.Timestamp getTimestamp(int columnIndex) throws java.sql.SQLExceptionReturns 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:
getTimestampin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed- See Also:
getObject(int, Class)
-
getBigDecimal
public java.math.BigDecimal getBigDecimal(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns the value of the specified column as a BigDecimal.- Specified by:
getBigDecimalin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getDate
public java.sql.Date getDate(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns 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:
getDatein interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed- See Also:
getObject(String, Class)
-
getTime
public java.sql.Time getTime(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns 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:
getTimein interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed- See Also:
getObject(String, Class)
-
getTimestamp
public java.sql.Timestamp getTimestamp(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns 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:
getTimestampin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed- See Also:
getObject(String, Class)
-
getObject
public java.lang.Object getObject(int columnIndex) throws java.sql.SQLExceptionReturns a column value as a Java object. The data is de-serialized into a Java object (on the client side).- Specified by:
getObjectin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value or null
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getObject
public java.lang.Object getObject(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns a column value as a Java object. The data is de-serialized into a Java object (on the client side).- Specified by:
getObjectin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value or null
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getBoolean
public boolean getBoolean(int columnIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a boolean.- Specified by:
getBooleanin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getBoolean
public boolean getBoolean(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns the value of the specified column as a boolean.- Specified by:
getBooleanin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
java.sql.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 java.sql.SQLExceptionReturns the value of the specified column as a byte.- Specified by:
getBytein interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getByte
public byte getByte(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns the value of the specified column as a byte.- Specified by:
getBytein interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
java.sql.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 java.sql.SQLExceptionReturns the value of the specified column as a short.- Specified by:
getShortin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getShort
public short getShort(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns the value of the specified column as a short.- Specified by:
getShortin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
java.sql.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 java.sql.SQLExceptionReturns the value of the specified column as a long.- Specified by:
getLongin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getLong
public long getLong(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns the value of the specified column as a long.- Specified by:
getLongin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
java.sql.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 java.sql.SQLExceptionReturns the value of the specified column as a float.- Specified by:
getFloatin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getFloat
public float getFloat(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns the value of the specified column as a float.- Specified by:
getFloatin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
java.sql.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 java.sql.SQLExceptionReturns the value of the specified column as a double.- Specified by:
getDoublein interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getDouble
public double getDouble(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns the value of the specified column as a double.- Specified by:
getDoublein interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getDoubleInternal
private double getDoubleInternal(int columnIndex)
-
getBigDecimal
@Deprecated public java.math.BigDecimal getBigDecimal(java.lang.String columnLabel, int scale) throws java.sql.SQLExceptionDeprecated.Returns the value of the specified column as a BigDecimal.- Specified by:
getBigDecimalin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelscale- the scale of the returned value- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getBigDecimal
@Deprecated public java.math.BigDecimal getBigDecimal(int columnIndex, int scale) throws java.sql.SQLExceptionDeprecated.Returns the value of the specified column as a BigDecimal.- Specified by:
getBigDecimalin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)scale- the scale of the returned value- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getUnicodeStream
@Deprecated public java.io.InputStream getUnicodeStream(int columnIndex) throws java.sql.SQLExceptionDeprecated.since JDBC 2.0, use getCharacterStream[Not supported]- Specified by:
getUnicodeStreamin interfacejava.sql.ResultSet- Throws:
java.sql.SQLException
-
getUnicodeStream
@Deprecated public java.io.InputStream getUnicodeStream(java.lang.String columnLabel) throws java.sql.SQLExceptionDeprecated.since JDBC 2.0, use setCharacterStream[Not supported]- Specified by:
getUnicodeStreamin interfacejava.sql.ResultSet- Throws:
java.sql.SQLException
-
getObject
public java.lang.Object getObject(int columnIndex, java.util.Map<java.lang.String,java.lang.Class<?>> map) throws java.sql.SQLException[Not supported] Gets a column as a object using the specified type mapping.- Specified by:
getObjectin interfacejava.sql.ResultSet- Throws:
java.sql.SQLException
-
getObject
public java.lang.Object getObject(java.lang.String columnLabel, java.util.Map<java.lang.String,java.lang.Class<?>> map) throws java.sql.SQLException[Not supported] Gets a column as a object using the specified type mapping.- Specified by:
getObjectin interfacejava.sql.ResultSet- Throws:
java.sql.SQLException
-
getRef
public java.sql.Ref getRef(int columnIndex) throws java.sql.SQLException[Not supported] Gets a column as a reference.- Specified by:
getRefin interfacejava.sql.ResultSet- Throws:
java.sql.SQLException
-
getRef
public java.sql.Ref getRef(java.lang.String columnLabel) throws java.sql.SQLException[Not supported] Gets a column as a reference.- Specified by:
getRefin interfacejava.sql.ResultSet- Throws:
java.sql.SQLException
-
getDate
public java.sql.Date getDate(int columnIndex, java.util.Calendar calendar) throws java.sql.SQLExceptionReturns 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:
getDatein interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)calendar- the calendar- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed- See Also:
getObject(int, Class)
-
getDate
public java.sql.Date getDate(java.lang.String columnLabel, java.util.Calendar calendar) throws java.sql.SQLExceptionReturns 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:
getDatein interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelcalendar- the calendar- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed- See Also:
getObject(String, Class)
-
getTime
public java.sql.Time getTime(int columnIndex, java.util.Calendar calendar) throws java.sql.SQLExceptionReturns 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:
getTimein interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)calendar- the calendar- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed- See Also:
getObject(int, Class)
-
getTime
public java.sql.Time getTime(java.lang.String columnLabel, java.util.Calendar calendar) throws java.sql.SQLExceptionReturns 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:
getTimein interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelcalendar- the calendar- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed- See Also:
getObject(String, Class)
-
getTimestamp
public java.sql.Timestamp getTimestamp(int columnIndex, java.util.Calendar calendar) throws java.sql.SQLExceptionReturns 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:
getTimestampin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)calendar- the calendar- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed- See Also:
getObject(int, Class)
-
getTimestamp
public java.sql.Timestamp getTimestamp(java.lang.String columnLabel, java.util.Calendar calendar) throws java.sql.SQLExceptionReturns 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:
getTimestampin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelcalendar- the calendar- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed- See Also:
getObject(String, Class)
-
getBlob
public java.sql.Blob getBlob(int columnIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a Blob.- Specified by:
getBlobin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getBlob
public java.sql.Blob getBlob(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns the value of the specified column as a Blob.- Specified by:
getBlobin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
java.sql.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 java.sql.SQLExceptionReturns the value of the specified column as a byte array.- Specified by:
getBytesin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getBytes
public byte[] getBytes(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns the value of the specified column as a byte array.- Specified by:
getBytesin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getBinaryStream
public java.io.InputStream getBinaryStream(int columnIndex) throws java.sql.SQLExceptionReturns the value of the specified column as an input stream.- Specified by:
getBinaryStreamin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getBinaryStream
public java.io.InputStream getBinaryStream(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns the value of the specified column as an input stream.- Specified by:
getBinaryStreamin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getClob
public java.sql.Clob getClob(int columnIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a Clob.- Specified by:
getClobin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getClob
public java.sql.Clob getClob(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns the value of the specified column as a Clob.- Specified by:
getClobin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getArray
public java.sql.Array getArray(int columnIndex) throws java.sql.SQLExceptionReturns the value of the specified column as an Array.- Specified by:
getArrayin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getArray
public java.sql.Array getArray(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns the value of the specified column as an Array.- Specified by:
getArrayin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getArray
private java.sql.Array getArray(int id, int columnIndex)
-
getAsciiStream
public java.io.InputStream getAsciiStream(int columnIndex) throws java.sql.SQLExceptionReturns the value of the specified column as an input stream.- Specified by:
getAsciiStreamin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getAsciiStream
public java.io.InputStream getAsciiStream(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns the value of the specified column as an input stream.- Specified by:
getAsciiStreamin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getCharacterStream
public java.io.Reader getCharacterStream(int columnIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a reader.- Specified by:
getCharacterStreamin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getCharacterStream
public java.io.Reader getCharacterStream(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns the value of the specified column as a reader.- Specified by:
getCharacterStreamin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getURL
public java.net.URL getURL(int columnIndex) throws java.sql.SQLException[Not supported]- Specified by:
getURLin interfacejava.sql.ResultSet- Throws:
java.sql.SQLException
-
getURL
public java.net.URL getURL(java.lang.String columnLabel) throws java.sql.SQLException[Not supported]- Specified by:
getURLin interfacejava.sql.ResultSet- Throws:
java.sql.SQLException
-
updateNull
public void updateNull(int columnIndex) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateNullin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateNull
public void updateNull(java.lang.String columnLabel) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateNullin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateBoolean
public void updateBoolean(int columnIndex, boolean x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateBooleanin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateBoolean
public void updateBoolean(java.lang.String columnLabel, boolean x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateBooleanin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if result set is closed or not updatable
-
updateByte
public void updateByte(int columnIndex, byte x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateBytein interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateByte
public void updateByte(java.lang.String columnLabel, byte x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateBytein interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateBytes
public void updateBytes(int columnIndex, byte[] x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateBytesin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateBytes
public void updateBytes(java.lang.String columnLabel, byte[] x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateBytesin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateShort
public void updateShort(int columnIndex, short x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateShortin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateShort
public void updateShort(java.lang.String columnLabel, short x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateShortin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateInt
public void updateInt(int columnIndex, int x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateIntin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateInt
public void updateInt(java.lang.String columnLabel, int x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateIntin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateLong
public void updateLong(int columnIndex, long x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateLongin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateLong
public void updateLong(java.lang.String columnLabel, long x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateLongin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateFloat
public void updateFloat(int columnIndex, float x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateFloatin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateFloat
public void updateFloat(java.lang.String columnLabel, float x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateFloatin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateDouble
public void updateDouble(int columnIndex, double x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateDoublein interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateDouble
public void updateDouble(java.lang.String columnLabel, double x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateDoublein interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateBigDecimal
public void updateBigDecimal(int columnIndex, java.math.BigDecimal x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateBigDecimalin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateBigDecimal
public void updateBigDecimal(java.lang.String columnLabel, java.math.BigDecimal x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateBigDecimalin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateString
public void updateString(int columnIndex, java.lang.String x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateStringin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateString
public void updateString(java.lang.String columnLabel, java.lang.String x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateStringin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateDate
public void updateDate(int columnIndex, java.sql.Date x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.Usage of this method is discouraged. Use
updateObject(columnIndex, value)withLocalDateparameter instead.- Specified by:
updateDatein interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable- See Also:
updateObject(int, Object)
-
updateDate
public void updateDate(java.lang.String columnLabel, java.sql.Date x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.Usage of this method is discouraged. Use
updateObject(columnLabel, value)withLocalDateparameter instead.- Specified by:
updateDatein interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable- See Also:
updateObject(String, Object)
-
updateTime
public void updateTime(int columnIndex, java.sql.Time x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.Usage of this method is discouraged. Use
updateObject(columnIndex, value)withLocalTimeparameter instead.- Specified by:
updateTimein interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable- See Also:
updateObject(int, Object)
-
updateTime
public void updateTime(java.lang.String columnLabel, java.sql.Time x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.Usage of this method is discouraged. Use
updateObject(columnLabel, value)withLocalTimeparameter instead.- Specified by:
updateTimein interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable- See Also:
updateObject(String, Object)
-
updateTimestamp
public void updateTimestamp(int columnIndex, java.sql.Timestamp x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.Usage of this method is discouraged. Use
updateObject(columnIndex, value)withLocalDateTimeparameter instead.- Specified by:
updateTimestampin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable- See Also:
updateObject(int, Object)
-
updateTimestamp
public void updateTimestamp(java.lang.String columnLabel, java.sql.Timestamp x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.Usage of this method is discouraged. Use
updateObject(columnLabel, value)withLocalDateTimeparameter instead.- Specified by:
updateTimestampin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable- See Also:
updateObject(String, Object)
-
updateAsciiStream
public void updateAsciiStream(int columnIndex, java.io.InputStream x, int length) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateAsciiStreamin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the valuelength- the number of characters- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateAsciiStream
public void updateAsciiStream(int columnIndex, java.io.InputStream x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateAsciiStreamin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateAsciiStream
public void updateAsciiStream(int columnIndex, java.io.InputStream x, long length) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateAsciiStreamin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the valuelength- the number of characters- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateAsciiStream
public void updateAsciiStream(java.lang.String columnLabel, java.io.InputStream x, int length) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateAsciiStreamin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the valuelength- the number of characters- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateAsciiStream
public void updateAsciiStream(java.lang.String columnLabel, java.io.InputStream x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateAsciiStreamin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed
-
updateAsciiStream
public void updateAsciiStream(java.lang.String columnLabel, java.io.InputStream x, long length) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateAsciiStreamin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the valuelength- the number of characters- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateAscii
private void updateAscii(int columnIndex, java.io.InputStream x, long length)
-
updateBinaryStream
public void updateBinaryStream(int columnIndex, java.io.InputStream x, int length) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateBinaryStreamin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the valuelength- the number of characters- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateBinaryStream
public void updateBinaryStream(int columnIndex, java.io.InputStream x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateBinaryStreamin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateBinaryStream
public void updateBinaryStream(int columnIndex, java.io.InputStream x, long length) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateBinaryStreamin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the valuelength- the number of characters- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateBinaryStream
public void updateBinaryStream(java.lang.String columnLabel, java.io.InputStream x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateBinaryStreamin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateBinaryStream
public void updateBinaryStream(java.lang.String columnLabel, java.io.InputStream x, int length) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateBinaryStreamin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the valuelength- the number of characters- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateBinaryStream
public void updateBinaryStream(java.lang.String columnLabel, java.io.InputStream x, long length) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateBinaryStreamin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the valuelength- the number of characters- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateCharacterStream
public void updateCharacterStream(int columnIndex, java.io.Reader x, long length) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateCharacterStreamin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the valuelength- the number of characters- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateCharacterStream
public void updateCharacterStream(int columnIndex, java.io.Reader x, int length) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateCharacterStreamin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the valuelength- the number of characters- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateCharacterStream
public void updateCharacterStream(int columnIndex, java.io.Reader x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateCharacterStreamin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateCharacterStream
public void updateCharacterStream(java.lang.String columnLabel, java.io.Reader x, int length) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateCharacterStreamin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the valuelength- the number of characters- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateCharacterStream
public void updateCharacterStream(java.lang.String columnLabel, java.io.Reader x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateCharacterStreamin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateCharacterStream
public void updateCharacterStream(java.lang.String columnLabel, java.io.Reader x, long length) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateCharacterStreamin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the valuelength- the number of characters- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateObject
public void updateObject(int columnIndex, java.lang.Object x, int scale) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateObjectin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the valuescale- is ignored- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateObject
public void updateObject(java.lang.String columnLabel, java.lang.Object x, int scale) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateObjectin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the valuescale- is ignored- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateObject
public void updateObject(int columnIndex, java.lang.Object x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateObjectin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateObject
public void updateObject(java.lang.String columnLabel, java.lang.Object x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateObjectin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateObject
public void updateObject(int columnIndex, java.lang.Object x, java.sql.SQLType targetSqlType) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateObjectin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the valuetargetSqlType- the SQL type- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateObject
public void updateObject(int columnIndex, java.lang.Object x, java.sql.SQLType targetSqlType, int scaleOrLength) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateObjectin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the valuetargetSqlType- the SQL typescaleOrLength- is ignored- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateObject
public void updateObject(java.lang.String columnLabel, java.lang.Object x, java.sql.SQLType targetSqlType) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateObjectin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the valuetargetSqlType- the SQL type- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateObject
public void updateObject(java.lang.String columnLabel, java.lang.Object x, java.sql.SQLType targetSqlType, int scaleOrLength) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateObjectin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the valuetargetSqlType- the SQL typescaleOrLength- is ignored- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateRef
public void updateRef(int columnIndex, java.sql.Ref x) throws java.sql.SQLException[Not supported]- Specified by:
updateRefin interfacejava.sql.ResultSet- Throws:
java.sql.SQLException
-
updateRef
public void updateRef(java.lang.String columnLabel, java.sql.Ref x) throws java.sql.SQLException[Not supported]- Specified by:
updateRefin interfacejava.sql.ResultSet- Throws:
java.sql.SQLException
-
updateBlob
public void updateBlob(int columnIndex, java.io.InputStream x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateBlobin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateBlob
public void updateBlob(int columnIndex, java.io.InputStream x, long length) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateBlobin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the valuelength- the length- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateBlob
public void updateBlob(int columnIndex, java.sql.Blob x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateBlobin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateBlob
public void updateBlob(java.lang.String columnLabel, java.sql.Blob x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateBlobin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateBlobImpl
private void updateBlobImpl(int columnIndex, java.sql.Blob x, long length) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
updateBlob
public void updateBlob(java.lang.String columnLabel, java.io.InputStream x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateBlobin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateBlob
public void updateBlob(java.lang.String columnLabel, java.io.InputStream x, long length) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateBlobin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the valuelength- the length- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateBlobImpl
private void updateBlobImpl(int columnIndex, java.io.InputStream x, long length)
-
updateClob
public void updateClob(int columnIndex, java.sql.Clob x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateClobin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateClob
public void updateClob(int columnIndex, java.io.Reader x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateClobin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateClob
public void updateClob(int columnIndex, java.io.Reader x, long length) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateClobin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the valuelength- the length- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateClob
public void updateClob(java.lang.String columnLabel, java.sql.Clob x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateClobin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateClob
public void updateClob(java.lang.String columnLabel, java.io.Reader x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateClobin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateClob
public void updateClob(java.lang.String columnLabel, java.io.Reader x, long length) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateClobin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the valuelength- the length- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateArray
public void updateArray(int columnIndex, java.sql.Array x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateArrayin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateArray
public void updateArray(java.lang.String columnLabel, java.sql.Array x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateArrayin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateArrayImpl
private void updateArrayImpl(int columnIndex, java.sql.Array x) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
getCursorName
public java.lang.String getCursorName() throws java.sql.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:
getCursorNamein interfacejava.sql.ResultSet- Throws:
java.sql.SQLException
-
getRow
public int getRow() throws java.sql.SQLExceptionGets 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:
getRowin interfacejava.sql.ResultSet- Returns:
- the row number
- Throws:
java.sql.SQLException
-
getConcurrency
public int getConcurrency() throws java.sql.SQLExceptionGets 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:
getConcurrencyin interfacejava.sql.ResultSet- Returns:
- ResultSet.CONCUR_UPDATABLE if the result set is updatable, or ResultSet.CONCUR_READ_ONLY otherwise
- Throws:
java.sql.SQLException
-
getFetchDirection
public int getFetchDirection() throws java.sql.SQLExceptionGets the fetch direction.- Specified by:
getFetchDirectionin interfacejava.sql.ResultSet- Returns:
- the direction: FETCH_FORWARD
- Throws:
java.sql.SQLException
-
getFetchSize
public int getFetchSize() throws java.sql.SQLExceptionGets the number of rows suggested to read in one step.- Specified by:
getFetchSizein interfacejava.sql.ResultSet- Returns:
- the current fetch size
- Throws:
java.sql.SQLException
-
setFetchSize
public void setFetchSize(int rows) throws java.sql.SQLExceptionSets 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:
setFetchSizein interfacejava.sql.ResultSet- Parameters:
rows- the number of rows- Throws:
java.sql.SQLException
-
setFetchDirection
public void setFetchDirection(int direction) throws java.sql.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:
setFetchDirectionin interfacejava.sql.ResultSet- Parameters:
direction- the new fetch direction- Throws:
java.sql.SQLException- Unsupported Feature if the method is called for a forward-only result set
-
getType
public int getType() throws java.sql.SQLExceptionGet the result set type.- Specified by:
getTypein interfacejava.sql.ResultSet- Returns:
- the result set type (TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE or TYPE_SCROLL_SENSITIVE)
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
isBeforeFirst
public boolean isBeforeFirst() throws java.sql.SQLExceptionChecks 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:
isBeforeFirstin interfacejava.sql.ResultSet- Returns:
- if there are results and the current position is before the first row
- Throws:
java.sql.SQLException- if the result set is closed
-
isAfterLast
public boolean isAfterLast() throws java.sql.SQLExceptionChecks 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:
isAfterLastin interfacejava.sql.ResultSet- Returns:
- if there are results and the current position is after the last row
- Throws:
java.sql.SQLException- if the result set is closed
-
isFirst
public boolean isFirst() throws java.sql.SQLExceptionChecks if the current position is row 1, that means next() was called once and returned true.- Specified by:
isFirstin interfacejava.sql.ResultSet- Returns:
- if the current position is the first row
- Throws:
java.sql.SQLException- if the result set is closed
-
isLast
public boolean isLast() throws java.sql.SQLExceptionChecks 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:
isLastin interfacejava.sql.ResultSet- Returns:
- if the current position is the last row
- Throws:
java.sql.SQLException- if the result set is closed
-
beforeFirst
public void beforeFirst() throws java.sql.SQLExceptionMoves the current position to before the first row, that means resets the result set.- Specified by:
beforeFirstin interfacejava.sql.ResultSet- Throws:
java.sql.SQLException- if the result set is closed
-
afterLast
public void afterLast() throws java.sql.SQLExceptionMoves the current position to after the last row, that means after the end.- Specified by:
afterLastin interfacejava.sql.ResultSet- Throws:
java.sql.SQLException- if the result set is closed
-
first
public boolean first() throws java.sql.SQLExceptionMoves the current position to the first row. This is the same as calling beforeFirst() followed by next().- Specified by:
firstin interfacejava.sql.ResultSet- Returns:
- true if there is a row available, false if not
- Throws:
java.sql.SQLException- if the result set is closed
-
last
public boolean last() throws java.sql.SQLExceptionMoves the current position to the last row.- Specified by:
lastin interfacejava.sql.ResultSet- Returns:
- true if there is a row available, false if not
- Throws:
java.sql.SQLException- if the result set is closed
-
absolute
public boolean absolute(int rowNumber) throws java.sql.SQLExceptionMoves the current position to a specific row.- Specified by:
absolutein interfacejava.sql.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:
java.sql.SQLException- if the result set is closed
-
relative
public boolean relative(int rowCount) throws java.sql.SQLExceptionMoves the current position to a specific row relative to the current row.- Specified by:
relativein interfacejava.sql.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:
java.sql.SQLException- if the result set is closed
-
previous
public boolean previous() throws java.sql.SQLExceptionMoves the cursor to the last row, or row before first row if the current position is the first row.- Specified by:
previousin interfacejava.sql.ResultSet- Returns:
- true if there is a row available, false if not
- Throws:
java.sql.SQLException- if the result set is closed
-
moveToInsertRow
public void moveToInsertRow() throws java.sql.SQLExceptionMoves the current position to the insert row. The current row is remembered.- Specified by:
moveToInsertRowin interfacejava.sql.ResultSet- Throws:
java.sql.SQLException- if the result set is closed or is not updatable
-
moveToCurrentRow
public void moveToCurrentRow() throws java.sql.SQLExceptionMoves the current position to the current row.- Specified by:
moveToCurrentRowin interfacejava.sql.ResultSet- Throws:
java.sql.SQLException- if the result set is closed or is not updatable
-
rowUpdated
public boolean rowUpdated() throws java.sql.SQLExceptionDetects if the row was updated (by somebody else or the caller).- Specified by:
rowUpdatedin interfacejava.sql.ResultSet- Returns:
- false because this driver does not detect this
- Throws:
java.sql.SQLException
-
rowInserted
public boolean rowInserted() throws java.sql.SQLExceptionDetects if the row was inserted.- Specified by:
rowInsertedin interfacejava.sql.ResultSet- Returns:
- false because this driver does not detect this
- Throws:
java.sql.SQLException
-
rowDeleted
public boolean rowDeleted() throws java.sql.SQLExceptionDetects if the row was deleted (by somebody else or the caller).- Specified by:
rowDeletedin interfacejava.sql.ResultSet- Returns:
- false because this driver does not detect this
- Throws:
java.sql.SQLException
-
insertRow
public void insertRow() throws java.sql.SQLExceptionInserts the current row. The current position must be the insert row.- Specified by:
insertRowin interfacejava.sql.ResultSet- Throws:
java.sql.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 java.sql.SQLExceptionUpdates the current row.- Specified by:
updateRowin interfacejava.sql.ResultSet- Throws:
java.sql.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 java.sql.SQLExceptionDeletes the current row.- Specified by:
deleteRowin interfacejava.sql.ResultSet- Throws:
java.sql.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 java.sql.SQLExceptionRe-reads the current row from the database.- Specified by:
refreshRowin interfacejava.sql.ResultSet- Throws:
java.sql.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 java.sql.SQLExceptionCancels updating a row.- Specified by:
cancelRowUpdatesin interfacejava.sql.ResultSet- Throws:
java.sql.SQLException- if the result set is closed or if the current row is the insert row
-
getUpdatableRow
private UpdatableRow getUpdatableRow() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getColumnIndex
private int getColumnIndex(java.lang.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 java.sql.RowId getRowId(int columnIndex) throws java.sql.SQLException[Not supported] Returns the value of the specified column as a row id.- Specified by:
getRowIdin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Throws:
java.sql.SQLException
-
getRowId
public java.sql.RowId getRowId(java.lang.String columnLabel) throws java.sql.SQLException[Not supported] Returns the value of the specified column as a row id.- Specified by:
getRowIdin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Throws:
java.sql.SQLException
-
updateRowId
public void updateRowId(int columnIndex, java.sql.RowId x) throws java.sql.SQLException[Not supported] Updates a column in the current or insert row.- Specified by:
updateRowIdin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException
-
updateRowId
public void updateRowId(java.lang.String columnLabel, java.sql.RowId x) throws java.sql.SQLException[Not supported] Updates a column in the current or insert row.- Specified by:
updateRowIdin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException
-
getHoldability
public int getHoldability() throws java.sql.SQLExceptionReturns the current result set holdability.- Specified by:
getHoldabilityin interfacejava.sql.ResultSet- Returns:
- the holdability
- Throws:
java.sql.SQLException- if the connection is closed
-
isClosed
public boolean isClosed() throws java.sql.SQLExceptionReturns whether this result set is closed.- Specified by:
isClosedin interfacejava.sql.ResultSet- Returns:
- true if the result set is closed
- Throws:
java.sql.SQLException
-
updateNString
public void updateNString(int columnIndex, java.lang.String x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateNStringin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateNString
public void updateNString(java.lang.String columnLabel, java.lang.String x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateNStringin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateNClob
public void updateNClob(int columnIndex, java.sql.NClob x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateNClobin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateNClob
public void updateNClob(int columnIndex, java.io.Reader x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateNClobin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateNClob
public void updateNClob(int columnIndex, java.io.Reader x, long length) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateNClobin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the valuelength- the length- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateNClob
public void updateNClob(java.lang.String columnLabel, java.io.Reader x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateNClobin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateNClob
public void updateNClob(java.lang.String columnLabel, java.io.Reader x, long length) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateNClobin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the valuelength- the length- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateNClob
public void updateNClob(java.lang.String columnLabel, java.sql.NClob x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateNClobin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateClobImpl
private void updateClobImpl(int columnIndex, java.sql.Clob x) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
getNClob
public java.sql.NClob getNClob(int columnIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a Clob.- Specified by:
getNClobin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getNClob
public java.sql.NClob getNClob(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns the value of the specified column as a Clob.- Specified by:
getNClobin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getClob
private JdbcClob getClob(int id, int columnIndex)
-
getSQLXML
public java.sql.SQLXML getSQLXML(int columnIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a SQLXML.- Specified by:
getSQLXMLin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getSQLXML
public java.sql.SQLXML getSQLXML(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns the value of the specified column as a SQLXML.- Specified by:
getSQLXMLin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
updateSQLXML
public void updateSQLXML(int columnIndex, java.sql.SQLXML xmlObject) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateSQLXMLin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)xmlObject- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateSQLXML
public void updateSQLXML(java.lang.String columnLabel, java.sql.SQLXML xmlObject) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateSQLXMLin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelxmlObject- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateSQLXMLImpl
private void updateSQLXMLImpl(int columnIndex, java.sql.SQLXML xmlObject) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
getNString
public java.lang.String getNString(int columnIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a String.- Specified by:
getNStringin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getNString
public java.lang.String getNString(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns the value of the specified column as a String.- Specified by:
getNStringin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getNCharacterStream
public java.io.Reader getNCharacterStream(int columnIndex) throws java.sql.SQLExceptionReturns the value of the specified column as a reader.- Specified by:
getNCharacterStreamin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getNCharacterStream
public java.io.Reader getNCharacterStream(java.lang.String columnLabel) throws java.sql.SQLExceptionReturns the value of the specified column as a reader.- Specified by:
getNCharacterStreamin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column label- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
updateNCharacterStream
public void updateNCharacterStream(int columnIndex, java.io.Reader x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateNCharacterStreamin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateNCharacterStream
public void updateNCharacterStream(int columnIndex, java.io.Reader x, long length) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateNCharacterStreamin interfacejava.sql.ResultSet- Parameters:
columnIndex- (1,2,...)x- the valuelength- the number of characters- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateNCharacterStream
public void updateNCharacterStream(java.lang.String columnLabel, java.io.Reader x) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateNCharacterStreamin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the value- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateNCharacterStream
public void updateNCharacterStream(java.lang.String columnLabel, java.io.Reader x, long length) throws java.sql.SQLExceptionUpdates a column in the current or insert row.- Specified by:
updateNCharacterStreamin interfacejava.sql.ResultSet- Parameters:
columnLabel- the column labelx- the valuelength- the number of characters- Throws:
java.sql.SQLException- if the result set is closed or not updatable
-
updateClobImpl
private void updateClobImpl(int columnIndex, java.io.Reader x, long length)
-
unwrap
public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLExceptionReturn an object of this class if possible.- Specified by:
unwrapin interfacejava.sql.Wrapper- Parameters:
iface- the class- Returns:
- this
- Throws:
java.sql.SQLException
-
isWrapperFor
public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLExceptionChecks if unwrap can return an object of this class.- Specified by:
isWrapperForin interfacejava.sql.Wrapper- Parameters:
iface- the class- Returns:
- whether or not the interface is assignable from this class
- Throws:
java.sql.SQLException
-
getObject
public <T> T getObject(int columnIndex, java.lang.Class<T> type) throws java.sql.SQLExceptionReturns a column value as a Java object of the specified type.- Specified by:
getObjectin interfacejava.sql.ResultSet- Parameters:
columnIndex- the column index (1, 2, ...)type- the class of the returned value- Returns:
- the value
- Throws:
java.sql.SQLException- if the column is not found or if the result set is closed
-
getObject
public <T> T getObject(java.lang.String columnName, java.lang.Class<T> type) throws java.sql.SQLExceptionReturns a column value as a Java object of the specified type.- Specified by:
getObjectin interfacejava.sql.ResultSet- Parameters:
columnName- the column nametype- the class of the returned value- Returns:
- the value
- Throws:
java.sql.SQLException
-
toString
public java.lang.String toString()
INTERNAL- Overrides:
toStringin classjava.lang.Object
-
patchCurrentRow
private void patchCurrentRow(Value[] row)
-
convertToValue
private Value convertToValue(java.lang.Object x, java.sql.SQLType targetSqlType)
-
convertToUnknownValue
private Value convertToUnknownValue(java.lang.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
-
-