Package net.snowflake.client.core
Class SFBaseResultSet
- java.lang.Object
-
- net.snowflake.client.core.SFBaseResultSet
-
- Direct Known Subclasses:
SFArrowResultSet,SFJsonResultSet
public abstract class SFBaseResultSet extends Object
Base class for query result set and metadata result set
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanisClosedprotected List<MetaDataOfBinds>metaDataOfBindsprotected intnumberOfBindsprotected Map<String,Object>parametersprotected SFResultSetMetaDataresultSetMetaDataprotected SnowflakeResultSetSerializableV1resultSetSerializableprotected longresultVersionprotected introwprotected SFBaseSessionsession
-
Constructor Summary
Constructors Constructor Description SFBaseResultSet()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanabsolute(int row)voidclose()abstract BigDecimalgetBigDecimal(int columnIndex)abstract BigDecimalgetBigDecimal(int columnIndex, int scale)abstract booleangetBoolean(int columnIndex)abstract bytegetByte(int columnIndex)abstract byte[]getBytes(int columnIndex)abstract DategetDate(int columnIndex, TimeZone tz)abstract doublegetDouble(int columnIndex)abstract floatgetFloat(int columnIndex)abstract intgetInt(int columnIndex)abstract longgetLong(int columnIndex)SFResultSetMetaDatagetMetaData()List<MetaDataOfBinds>getMetaDataOfBinds()intgetNumberOfBinds()abstract ObjectgetObject(int columnIndex)abstract StringgetQueryId()List<SnowflakeResultSetSerializable>getResultSetSerializables(long maxSizeInBytes)Split this whole SnowflakeResultSetSerializable into small pieces based on the user specified data size.intgetRow()SFBaseSessiongetSession()abstract shortgetShort(int columnIndex)abstract SFStatementTypegetStatementType()abstract StringgetString(int columnIndex)abstract TimegetTime(int columnIndex)abstract TimestampgetTimestamp(int columnIndex, TimeZone tz)abstract booleanisAfterLast()booleanisArrayBindSupported()booleanisBeforeFirst()booleanisClosed()booleanisFirst()abstract booleanisLast()booleannext()booleanprevious()booleanrelative(int rows)voidsetSession(SFBaseSession session)abstract voidsetStatementType(SFStatementType statementType)booleanwasNull()
-
-
-
Field Detail
-
resultSetMetaData
protected SFResultSetMetaData resultSetMetaData
-
row
protected int row
-
resultVersion
protected long resultVersion
-
numberOfBinds
protected int numberOfBinds
-
metaDataOfBinds
protected List<MetaDataOfBinds> metaDataOfBinds
-
session
protected SFBaseSession session
-
isClosed
protected boolean isClosed
-
resultSetSerializable
protected SnowflakeResultSetSerializableV1 resultSetSerializable
-
-
Method Detail
-
isLast
public abstract boolean isLast()
-
isAfterLast
public abstract boolean isAfterLast()
-
getString
public abstract String getString(int columnIndex) throws SFException
- Throws:
SFException
-
getBoolean
public abstract boolean getBoolean(int columnIndex) throws SFException- Throws:
SFException
-
getByte
public abstract byte getByte(int columnIndex) throws SFException- Throws:
SFException
-
getShort
public abstract short getShort(int columnIndex) throws SFException- Throws:
SFException
-
getInt
public abstract int getInt(int columnIndex) throws SFException- Throws:
SFException
-
getLong
public abstract long getLong(int columnIndex) throws SFException- Throws:
SFException
-
getFloat
public abstract float getFloat(int columnIndex) throws SFException- Throws:
SFException
-
getDouble
public abstract double getDouble(int columnIndex) throws SFException- Throws:
SFException
-
getBytes
public abstract byte[] getBytes(int columnIndex) throws SFException- Throws:
SFException
-
getTime
public abstract Time getTime(int columnIndex) throws SFException
- Throws:
SFException
-
getTimestamp
public abstract Timestamp getTimestamp(int columnIndex, TimeZone tz) throws SFException
- Throws:
SFException
-
getDate
public abstract Date getDate(int columnIndex, TimeZone tz) throws SFException
- Throws:
SFException
-
getObject
public abstract Object getObject(int columnIndex) throws SFException
- Throws:
SFException
-
getBigDecimal
public abstract BigDecimal getBigDecimal(int columnIndex) throws SFException
- Throws:
SFException
-
getBigDecimal
public abstract BigDecimal getBigDecimal(int columnIndex, int scale) throws SFException
- Throws:
SFException
-
getStatementType
public abstract SFStatementType getStatementType()
-
setStatementType
public abstract void setStatementType(SFStatementType statementType) throws SQLException
- Throws:
SQLException
-
getQueryId
public abstract String getQueryId()
-
setSession
public void setSession(SFBaseSession session)
-
getSession
public SFBaseSession getSession()
-
next
public boolean next() throws SFException, SnowflakeSQLException- Throws:
SFExceptionSnowflakeSQLException
-
close
public void close() throws SnowflakeSQLException- Throws:
SnowflakeSQLException
-
wasNull
public boolean wasNull()
-
getMetaData
public SFResultSetMetaData getMetaData()
-
getRow
public int getRow() throws SQLException- Throws:
SQLException
-
absolute
public boolean absolute(int row) throws SFException- Throws:
SFException
-
relative
public boolean relative(int rows) throws SFException- Throws:
SFException
-
previous
public boolean previous() throws SFException- Throws:
SFException
-
getNumberOfBinds
public int getNumberOfBinds()
-
getMetaDataOfBinds
public List<MetaDataOfBinds> getMetaDataOfBinds()
-
isFirst
public boolean isFirst()
-
isBeforeFirst
public boolean isBeforeFirst()
-
isClosed
public boolean isClosed()
-
isArrayBindSupported
public boolean isArrayBindSupported()
-
getResultSetSerializables
public List<SnowflakeResultSetSerializable> getResultSetSerializables(long maxSizeInBytes) throws SQLException
Split this whole SnowflakeResultSetSerializable into small pieces based on the user specified data size.- Parameters:
maxSizeInBytes- 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.- Returns:
- a list of SnowflakeResultSetSerializable
- Throws:
SQLException- if fails to split objects.
-
-