public class SnowflakeResultSetV1 extends SnowflakeBaseResultSet implements SnowflakeResultSet, ResultSet
parameters, resultSetMetaData, session, statementCLOSE_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| Constructor and Description |
|---|
SnowflakeResultSetV1(SFBaseResultSet sfBaseResultSet,
SnowflakeResultSetSerializableV1 resultSetSerializable)
Constructor takes a result set serializable object to create a sessionless result set.
|
SnowflakeResultSetV1(SFBaseResultSet sfBaseResultSet,
Statement statement)
Constructor takes an inputstream from the API response that we get from executing a SQL
statement.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
close(boolean removeClosedResultSetFromStatement) |
BigDecimal |
getBigDecimal(int columnIndex) |
BigDecimal |
getBigDecimal(int columnIndex,
int scale)
Deprecated.
|
boolean |
getBoolean(int columnIndex) |
byte |
getByte(int columnIndex) |
byte[] |
getBytes(int columnIndex) |
Date |
getDate(int columnIndex,
TimeZone tz) |
double |
getDouble(int columnIndex) |
float |
getFloat(int columnIndex) |
int |
getInt(int columnIndex) |
long |
getLong(int columnIndex) |
ResultSetMetaData |
getMetaData() |
Object |
getObject(int columnIndex) |
String |
getQueryID() |
List<SnowflakeResultSetSerializable> |
getResultSetSerializables(long maxSizeInBytes)
Get a list of ResultSetSerializables for the ResultSet in order to parallel processing
|
int |
getRow() |
short |
getShort(int columnIndex) |
QueryStatus |
getStatus()
This function is not supported for synchronous queries
|
String |
getString(int columnIndex) |
Time |
getTime(int columnIndex) |
Timestamp |
getTimestamp(int columnIndex,
TimeZone tz) |
boolean |
isAfterLast() |
boolean |
isBeforeFirst() |
boolean |
isClosed() |
boolean |
isFirst() |
boolean |
isLast() |
boolean |
isWrapperFor(Class<?> iface) |
boolean |
next()
Advance to next row
|
<T> T |
unwrap(Class<T> iface) |
boolean |
wasNull() |
absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getByte, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getCursorName, getDate, getDate, getDate, getDate, getDouble, getFetchDirection, getFetchSize, getFloat, getHoldability, getInt, getLong, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getRef, getRef, getRowId, getRowId, getShort, getSQLXML, getSQLXML, getStatement, getString, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, last, moveToCurrentRow, moveToInsertRow, previous, raiseSQLExceptionIfResultSetIsClosed, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, 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, updateTimestampclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitabsolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getByte, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getCursorName, getDate, getDate, getDate, getDate, getDouble, getFetchDirection, getFetchSize, getFloat, getHoldability, getInt, getLong, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getRef, getRef, getRowId, getRowId, getShort, getSQLXML, getSQLXML, getStatement, getString, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, last, moveToCurrentRow, moveToInsertRow, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, 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, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamppublic SnowflakeResultSetV1(SFBaseResultSet sfBaseResultSet, Statement statement) throws SQLException
The constructor will fetch the first row (if any) so that it can initialize the ResultSetMetaData.
sfBaseResultSet - snowflake core base result rest objectstatement - query statement that generates this result setSQLException - if failed to construct snowflake result set metadatapublic SnowflakeResultSetV1(SFBaseResultSet sfBaseResultSet, SnowflakeResultSetSerializableV1 resultSetSerializable) throws SQLException
sfBaseResultSet - snowflake core base result rest objectresultSetSerializable - The result set serializable object which includes all metadata to
create the result setSQLException - if fails to create the result set objectpublic QueryStatus getStatus() throws SQLException
getStatus in interface SnowflakeResultSetSQLFeatureNotSupportedExceptionSQLExceptionpublic boolean next()
throws SQLException
next in interface ResultSetnext in class SnowflakeBaseResultSetSQLException - if failed to move to the next rowpublic void close()
throws SQLException
close in interface AutoCloseableclose in interface ResultSetSQLExceptionpublic void close(boolean removeClosedResultSetFromStatement)
throws SQLException
SQLExceptionpublic String getQueryID()
getQueryID in interface SnowflakeResultSetpublic boolean wasNull()
throws SQLException
wasNull in interface ResultSetSQLExceptionpublic String getString(int columnIndex) throws SQLException
getString in interface ResultSetSQLExceptionpublic boolean getBoolean(int columnIndex)
throws SQLException
getBoolean in interface ResultSetSQLExceptionpublic byte getByte(int columnIndex)
throws SQLException
getByte in interface ResultSetSQLExceptionpublic short getShort(int columnIndex)
throws SQLException
getShort in interface ResultSetSQLExceptionpublic int getInt(int columnIndex)
throws SQLException
getInt in interface ResultSetSQLExceptionpublic long getLong(int columnIndex)
throws SQLException
getLong in interface ResultSetSQLExceptionpublic float getFloat(int columnIndex)
throws SQLException
getFloat in interface ResultSetSQLExceptionpublic double getDouble(int columnIndex)
throws SQLException
getDouble in interface ResultSetSQLExceptionpublic Date getDate(int columnIndex, TimeZone tz) throws SQLException
getDate in class SnowflakeBaseResultSetSQLExceptionpublic Time getTime(int columnIndex) throws SQLException
getTime in interface ResultSetgetTime in class SnowflakeBaseResultSetSQLExceptionpublic Timestamp getTimestamp(int columnIndex, TimeZone tz) throws SQLException
getTimestamp in class SnowflakeBaseResultSetSQLExceptionpublic ResultSetMetaData getMetaData() throws SQLException
getMetaData in interface ResultSetgetMetaData in class SnowflakeBaseResultSetSQLExceptionpublic Object getObject(int columnIndex) throws SQLException
getObject in interface ResultSetSQLExceptionpublic BigDecimal getBigDecimal(int columnIndex) throws SQLException
getBigDecimal in interface ResultSetSQLException@Deprecated public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException
getBigDecimal in interface ResultSetSQLExceptionpublic byte[] getBytes(int columnIndex)
throws SQLException
getBytes in interface ResultSetgetBytes in class SnowflakeBaseResultSetSQLExceptionpublic int getRow()
throws SQLException
getRow in interface ResultSetSQLExceptionpublic boolean isFirst()
throws SQLException
isFirst in interface ResultSetSQLExceptionpublic boolean isClosed()
throws SQLException
isClosed in interface ResultSetisClosed in class SnowflakeBaseResultSetSQLExceptionpublic boolean isLast()
throws SQLException
isLast in interface ResultSetSQLExceptionpublic boolean isAfterLast()
throws SQLException
isAfterLast in interface ResultSetSQLExceptionpublic boolean isBeforeFirst()
throws SQLException
isBeforeFirst in interface ResultSetSQLExceptionpublic boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor in interface WrapperisWrapperFor in class SnowflakeBaseResultSetSQLExceptionpublic <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface Wrapperunwrap in class SnowflakeBaseResultSetSQLExceptionpublic List<SnowflakeResultSetSerializable> getResultSetSerializables(long maxSizeInBytes) throws SQLException
getResultSetSerializables in interface SnowflakeResultSetmaxSizeInBytes - The expected max data size wrapped in the ResultSetSerializables object.
NOTE: this parameter is intended to make the data size in each serializable object to be
less than it. But if user specifies a small value which may be smaller than the data size
of one result chunk. So the definition can't be guaranteed completely. For this special
case, one serializable object is used to wrap the data chunk.SQLException - If it fails to get the ResultSetSerializable objects.Copyright © 2022. All rights reserved.