Package io.deephaven.jdbc
Class DeephavenForwardOnlyResultSet
java.lang.Object
io.deephaven.jdbc.ReadOnlyResultSet
io.deephaven.jdbc.DeephavenForwardOnlyResultSet
- All Implemented Interfaces:
AutoCloseable
,ResultSet
,Wrapper
public class DeephavenForwardOnlyResultSet extends ReadOnlyResultSet
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 Type Method Description boolean
absolute(int row)
void
afterLast()
void
beforeFirst()
void
clearWarnings()
void
close()
int
findColumn(String columnLabel)
boolean
first()
Array
getArray(int columnIndex)
Array
getArray(String columnLabel)
InputStream
getAsciiStream(int columnIndex)
InputStream
getAsciiStream(String columnLabel)
BigDecimal
getBigDecimal(int columnIndex)
BigDecimal
getBigDecimal(int columnIndex, int scale)
BigDecimal
getBigDecimal(String columnLabel)
BigDecimal
getBigDecimal(String columnLabel, int scale)
InputStream
getBinaryStream(int columnIndex)
InputStream
getBinaryStream(String columnLabel)
Blob
getBlob(int columnIndex)
Blob
getBlob(String columnLabel)
boolean
getBoolean(int columnIndex)
boolean
getBoolean(String columnLabel)
byte
getByte(int columnIndex)
byte
getByte(String columnLabel)
byte[]
getBytes(int columnIndex)
byte[]
getBytes(String columnLabel)
Reader
getCharacterStream(int columnIndex)
Reader
getCharacterStream(String columnLabel)
Clob
getClob(int columnIndex)
Clob
getClob(String columnLabel)
int
getConcurrency()
String
getCursorName()
Date
getDate(int columnIndex)
Date
getDate(int columnIndex, Calendar cal)
Date
getDate(String columnLabel)
Date
getDate(String columnLabel, Calendar cal)
double
getDouble(int columnIndex)
double
getDouble(String columnLabel)
int
getFetchDirection()
int
getFetchSize()
float
getFloat(int columnIndex)
float
getFloat(String columnLabel)
int
getHoldability()
int
getInt(int columnIndex)
int
getInt(String columnLabel)
long
getLong(int columnIndex)
long
getLong(String columnLabel)
ResultSetMetaData
getMetaData()
Reader
getNCharacterStream(int columnIndex)
Reader
getNCharacterStream(String columnLabel)
NClob
getNClob(int columnIndex)
NClob
getNClob(String columnLabel)
String
getNString(int columnIndex)
String
getNString(String columnLabel)
Object
getObject(int columnIndex)
<T> T
getObject(int columnIndex, Class<T> type)
Object
getObject(int columnIndex, Map<String,Class<?>> map)
Object
getObject(String columnLabel)
<T> T
getObject(String columnLabel, Class<T> type)
Object
getObject(String columnLabel, Map<String,Class<?>> map)
Ref
getRef(int columnIndex)
Ref
getRef(String columnLabel)
int
getRow()
RowId
getRowId(int columnIndex)
RowId
getRowId(String columnLabel)
short
getShort(int columnIndex)
short
getShort(String columnLabel)
SQLXML
getSQLXML(int columnIndex)
SQLXML
getSQLXML(String columnLabel)
Statement
getStatement()
String
getString(int columnIndex)
String
getString(String columnLabel)
Time
getTime(int columnIndex)
Time
getTime(int columnIndex, Calendar cal)
Time
getTime(String columnLabel)
Time
getTime(String columnLabel, Calendar cal)
Timestamp
getTimestamp(int columnIndex)
Timestamp
getTimestamp(int columnIndex, Calendar cal)
Timestamp
getTimestamp(String columnLabel)
Timestamp
getTimestamp(String columnLabel, Calendar cal)
int
getType()
InputStream
getUnicodeStream(int columnIndex)
InputStream
getUnicodeStream(String columnLabel)
URL
getURL(int columnIndex)
URL
getURL(String columnLabel)
SQLWarning
getWarnings()
boolean
isAfterLast()
boolean
isBeforeFirst()
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
-