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 boolean
isClosed
protected List<MetaDataOfBinds>
metaDataOfBinds
protected int
numberOfBinds
protected Map<String,Object>
parameters
protected SFResultSetMetaData
resultSetMetaData
protected SnowflakeResultSetSerializableV1
resultSetSerializable
protected long
resultVersion
protected int
row
protected SFBaseSession
session
-
Constructor Summary
Constructors Constructor Description SFBaseResultSet()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
absolute(int row)
void
close()
abstract BigDecimal
getBigDecimal(int columnIndex)
abstract BigDecimal
getBigDecimal(int columnIndex, int scale)
abstract boolean
getBoolean(int columnIndex)
abstract byte
getByte(int columnIndex)
abstract byte[]
getBytes(int columnIndex)
abstract Date
getDate(int columnIndex, TimeZone tz)
abstract double
getDouble(int columnIndex)
abstract float
getFloat(int columnIndex)
abstract int
getInt(int columnIndex)
abstract long
getLong(int columnIndex)
SFResultSetMetaData
getMetaData()
List<MetaDataOfBinds>
getMetaDataOfBinds()
int
getNumberOfBinds()
abstract Object
getObject(int columnIndex)
abstract String
getQueryId()
List<SnowflakeResultSetSerializable>
getResultSetSerializables(long maxSizeInBytes)
Split this whole SnowflakeResultSetSerializable into small pieces based on the user specified data size.int
getRow()
SFBaseSession
getSession()
abstract short
getShort(int columnIndex)
abstract SFStatementType
getStatementType()
abstract String
getString(int columnIndex)
abstract Time
getTime(int columnIndex)
abstract Timestamp
getTimestamp(int columnIndex, TimeZone tz)
abstract boolean
isAfterLast()
boolean
isArrayBindSupported()
boolean
isBeforeFirst()
boolean
isClosed()
boolean
isFirst()
abstract boolean
isLast()
boolean
next()
boolean
previous()
boolean
relative(int rows)
void
setSession(SFBaseSession session)
abstract void
setStatementType(SFStatementType statementType)
boolean
wasNull()
-
-
-
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:
SFException
SnowflakeSQLException
-
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.
-
-