Package io.deephaven.jdbc
Class DeephavenForwardOnlyResultSet
java.lang.Object
io.deephaven.jdbc.ReadOnlyResultSet
io.deephaven.jdbc.DeephavenForwardOnlyResultSet
- All Implemented Interfaces:
AutoCloseable
,ResultSet
,Wrapper
A ResultSet implementation that iterates the rows of an InitialSnapshot object (a snapshot of a portion of
(a snapshot of) a Deephaven table from the server). Internally, an InitialSnapshot is just an array of column data
arrays. For each directly supported SQL type, there are internal getter methods (ie getLongInternal) designed to work
with that column type. These getters are efficient but expect the raw column data to be a specific type.
By contrast, the public getter methods (ie getLong) are designed to be as forgiving as possible. If the source type
can be converted to the requested type, the getter will perform the conversion as intelligently as possible.
Note that we generally avoid exposing the raw column data to the client. This is so that this class
can be reimplemented without a risk of breaking client code. For example, Timestamps are currently encoded as
long values, but we do not want the client to know or depend on this. The exception to this are column types not
explicitly supported, which get mapped to the the JAVA_OBJECT type. Customers who want maximum portability over time
should avoid custom types.
-
Field Summary
Fields inherited from interface java.sql.ResultSet
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE
-
Method Summary
Modifier and TypeMethodDescriptionboolean
absolute
(int row) void
void
void
void
close()
int
findColumn
(String columnLabel) boolean
first()
getArray
(int columnIndex) getAsciiStream
(int columnIndex) getAsciiStream
(String columnLabel) getBigDecimal
(int columnIndex) getBigDecimal
(int columnIndex, int scale) getBigDecimal
(String columnLabel) getBigDecimal
(String columnLabel, int scale) getBinaryStream
(int columnIndex) getBinaryStream
(String columnLabel) getBlob
(int columnIndex) boolean
getBoolean
(int columnIndex) boolean
getBoolean
(String columnLabel) byte
getByte
(int columnIndex) byte
byte[]
getBytes
(int columnIndex) byte[]
getCharacterStream
(int columnIndex) getCharacterStream
(String columnLabel) getClob
(int columnIndex) int
getDate
(int columnIndex) double
getDouble
(int columnIndex) double
int
int
float
getFloat
(int columnIndex) float
int
int
getInt
(int columnIndex) int
long
getLong
(int columnIndex) long
getNCharacterStream
(int columnIndex) getNCharacterStream
(String columnLabel) getNClob
(int columnIndex) getNString
(int columnIndex) getNString
(String columnLabel) getObject
(int columnIndex) <T> T
<T> T
getRef
(int columnIndex) int
getRow()
getRowId
(int columnIndex) short
getShort
(int columnIndex) short
getSQLXML
(int columnIndex) getString
(int columnIndex) getTime
(int columnIndex) getTimestamp
(int columnIndex) getTimestamp
(int columnIndex, Calendar cal) getTimestamp
(String columnLabel) getTimestamp
(String columnLabel, Calendar cal) int
getType()
getUnicodeStream
(int columnIndex) getUnicodeStream
(String columnLabel) getURL
(int columnIndex) boolean
boolean
boolean
isClosed()
boolean
isFirst()
boolean
isLast()
boolean
last()
boolean
next()
boolean
previous()
boolean
relative
(int rows) void
setFetchDirection
(int direction) void
setFetchSize
(int rows) boolean
wasNull()
Methods inherited from class io.deephaven.jdbc.ReadOnlyResultSet
cancelRowUpdates, deleteRow, insertRow, isWrapperFor, moveToCurrentRow, moveToInsertRow, refreshRow, rowDeleted, rowInserted, rowUpdated, unwrap, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.sql.ResultSet
updateObject, updateObject, updateObject, updateObject
-
Method Details
-
next
- Throws:
SQLException
-
close
public void close() -
wasNull
public boolean wasNull() -
getString
- Throws:
SQLException
-
getBoolean
- Throws:
SQLException
-
getByte
- Throws:
SQLException
-
getShort
- Throws:
SQLException
-
getInt
- Throws:
SQLException
-
getLong
- Throws:
SQLException
-
getFloat
- Throws:
SQLException
-
getDouble
- Throws:
SQLException
-
getBigDecimal
- Throws:
SQLException
-
getBigDecimal
- Throws:
SQLException
-
getBytes
- Throws:
SQLException
-
getDate
- Throws:
SQLException
-
getDate
- Throws:
SQLException
-
getTime
- Throws:
SQLException
-
getTime
- Throws:
SQLException
-
getTimestamp
- Throws:
SQLException
-
getTimestamp
- Throws:
SQLException
-
getObject
- Throws:
SQLException
-
getObject
- Throws:
SQLException
-
getObject
- Throws:
SQLException
-
getRef
- Throws:
SQLException
-
getBlob
- Throws:
SQLException
-
getClob
- Throws:
SQLException
-
getArray
- Throws:
SQLException
-
getAsciiStream
- Throws:
SQLException
-
getUnicodeStream
- Throws:
SQLException
-
getBinaryStream
- Throws:
SQLException
-
getCharacterStream
- Throws:
SQLException
-
getRowId
- Throws:
SQLException
-
getURL
- Throws:
SQLException
-
getNString
- Throws:
SQLException
-
getNClob
- Throws:
SQLException
-
getNCharacterStream
- Throws:
SQLException
-
getSQLXML
- Throws:
SQLException
-
getString
- Throws:
SQLException
-
getBoolean
- Throws:
SQLException
-
getByte
- Throws:
SQLException
-
getShort
- Throws:
SQLException
-
getInt
- Throws:
SQLException
-
getLong
- Throws:
SQLException
-
getFloat
- Throws:
SQLException
-
getDouble
- Throws:
SQLException
-
getBigDecimal
- Throws:
SQLException
-
getBytes
- Throws:
SQLException
-
getDate
- Throws:
SQLException
-
getTime
- Throws:
SQLException
-
getTimestamp
- Throws:
SQLException
-
getAsciiStream
- Throws:
SQLException
-
getUnicodeStream
- Throws:
SQLException
-
getBinaryStream
- Throws:
SQLException
-
getWarnings
-
clearWarnings
public void clearWarnings() -
getCursorName
- Throws:
SQLException
-
getMetaData
- Throws:
SQLException
-
getObject
- Throws:
SQLException
-
findColumn
- Throws:
SQLException
-
getCharacterStream
- Throws:
SQLException
-
getBigDecimal
- Throws:
SQLException
-
isBeforeFirst
- Throws:
SQLException
-
isAfterLast
- Throws:
SQLException
-
isFirst
- Throws:
SQLException
-
isLast
- Throws:
SQLException
-
beforeFirst
- Throws:
SQLException
-
afterLast
- Throws:
SQLException
-
first
- Throws:
SQLException
-
last
- Throws:
SQLException
-
getRow
- Throws:
SQLException
-
absolute
- Throws:
SQLException
-
relative
- Throws:
SQLException
-
previous
- Throws:
SQLException
-
setFetchDirection
- Throws:
SQLException
-
getFetchDirection
public int getFetchDirection() -
setFetchSize
- Throws:
SQLException
-
getFetchSize
- Throws:
SQLException
-
getType
public int getType() -
getConcurrency
public int getConcurrency() -
getStatement
-
getObject
- Throws:
SQLException
-
getRef
- Throws:
SQLException
-
getBlob
- Throws:
SQLException
-
getClob
- Throws:
SQLException
-
getArray
- Throws:
SQLException
-
getDate
- Throws:
SQLException
-
getTime
- Throws:
SQLException
-
getTimestamp
- Throws:
SQLException
-
getURL
- Throws:
SQLException
-
getHoldability
- Throws:
SQLException
-
isClosed
public boolean isClosed() -
getNClob
- Throws:
SQLException
-
getSQLXML
- Throws:
SQLException
-
getNString
- Throws:
SQLException
-
getNCharacterStream
- Throws:
SQLException
-
getObject
- Throws:
SQLException
-
getRowId
- Throws:
SQLException
-