Package net.snowflake.client.core
Class ArrowSqlInput
- java.lang.Object
-
- net.snowflake.client.core.BaseSqlInput
-
- net.snowflake.client.core.ArrowSqlInput
-
- All Implemented Interfaces:
SQLInput
,SFSqlInput
@SnowflakeJdbcInternalApi public class ArrowSqlInput extends BaseSqlInput
-
-
Field Summary
-
Fields inherited from class net.snowflake.client.core.BaseSqlInput
converters, fields, session
-
-
Constructor Summary
Constructors Constructor Description ArrowSqlInput(Map<String,Object> input, SFBaseSession session, Converters converters, List<FieldMetadata> fields)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
getInput()
<T> T[]
readArray(Class<T> type)
Reads the next attribute in the stream and returns it as aArray
object.BigDecimal
readBigDecimal()
boolean
readBoolean()
byte
readByte()
byte[]
readBytes()
Date
readDate()
double
readDouble()
float
readFloat()
int
readInt()
<T> List<T>
readList(Class<T> type)
Reads the next attribute in the stream and returns it as aList
object.long
readLong()
<T> Map<String,T>
readMap(Class<T> type)
Reads the next attribute in the stream and returns it as aMap
object.Object
readObject()
<T> T
readObject(Class<T> type)
<T> T
readObject(Class<T> type, TimeZone tz)
Reads the next attribute in the stream and returns it as aObject
object.short
readShort()
String
readString()
Time
readTime()
Timestamp
readTimestamp(TimeZone tz)
Reads the next attribute in the stream and returns it as ajava.sql.Timestamp
object.boolean
wasNull()
-
Methods inherited from class net.snowflake.client.core.BaseSqlInput
convertBigDecimal, convertBoolean, convertBytes, convertDouble, convertFloat, convertInt, convertLong, convertShort, convertString, readArray, readAsciiStream, readBinaryStream, readBlob, readCharacterStream, readClob, readNClob, readNString, readRef, readRowId, readSQLXML, readTimestamp, readURL
-
-
-
-
Constructor Detail
-
ArrowSqlInput
public ArrowSqlInput(Map<String,Object> input, SFBaseSession session, Converters converters, List<FieldMetadata> fields)
-
-
Method Detail
-
readString
public String readString() throws SQLException
- Throws:
SQLException
-
readBoolean
public boolean readBoolean() throws SQLException
- Throws:
SQLException
-
readByte
public byte readByte() throws SQLException
- Throws:
SQLException
-
readShort
public short readShort() throws SQLException
- Throws:
SQLException
-
readInt
public int readInt() throws SQLException
- Throws:
SQLException
-
readLong
public long readLong() throws SQLException
- Throws:
SQLException
-
readFloat
public float readFloat() throws SQLException
- Throws:
SQLException
-
readDouble
public double readDouble() throws SQLException
- Throws:
SQLException
-
readBigDecimal
public BigDecimal readBigDecimal() throws SQLException
- Throws:
SQLException
-
readBytes
public byte[] readBytes() throws SQLException
- Throws:
SQLException
-
readDate
public Date readDate() throws SQLException
- Throws:
SQLException
-
readTime
public Time readTime() throws SQLException
- Throws:
SQLException
-
readTimestamp
public Timestamp readTimestamp(TimeZone tz) throws SQLException
Description copied from interface:SFSqlInput
Reads the next attribute in the stream and returns it as ajava.sql.Timestamp
object.- Parameters:
tz
- timezone to consider.- Returns:
- the attribute; if the value is SQL
NULL
, returnsnull
- Throws:
SQLException
- if a database access error occurs
-
readObject
public Object readObject() throws SQLException
- Throws:
SQLException
-
readObject
public <T> T readObject(Class<T> type) throws SQLException
- Throws:
SQLException
-
readObject
public <T> T readObject(Class<T> type, TimeZone tz) throws SQLException
Description copied from interface:SFSqlInput
Reads the next attribute in the stream and returns it as aObject
object.- Type Parameters:
T
- the type of the class modeled by this Class object- Parameters:
type
- Class representing the Java data type to convert the attribute to.tz
- timezone to consider.- Returns:
- the attribute at the head of the stream as an
Object
in the Java programming language;null
if the attribute is SQLNULL
- Throws:
SQLException
- if a database access error occurs
-
readList
public <T> List<T> readList(Class<T> type) throws SQLException
Description copied from interface:SFSqlInput
Reads the next attribute in the stream and returns it as aList
object.- Type Parameters:
T
- the type of the class modeled by this Class object- Parameters:
type
- Class representing the Java data type to convert the attribute to.- Returns:
- the attribute at the head of the stream as an
List
in the Java programming language;null
if the attribute is SQLNULL
- Throws:
SQLException
- if a database access error occurs
-
readArray
public <T> T[] readArray(Class<T> type) throws SQLException
Description copied from interface:SFSqlInput
Reads the next attribute in the stream and returns it as aArray
object.- Type Parameters:
T
- the type of the class modeled by this Class object- Parameters:
type
- Class representing the Java data type to convert the attribute to.- Returns:
- the attribute at the head of the stream as an
Array
in the Java programming language;null
if the attribute is SQLNULL
- Throws:
SQLException
- if a database access error occurs
-
readMap
public <T> Map<String,T> readMap(Class<T> type) throws SQLException
Description copied from interface:SFSqlInput
Reads the next attribute in the stream and returns it as aMap
object.- Type Parameters:
T
- the type of the class modeled by this Class object- Parameters:
type
- Class representing the Java data type to convert the attribute to.- Returns:
- the attribute at the head of the stream as an
Map
in the Java programming language;null
if the attribute is SQLNULL
- Throws:
SQLException
- if a database access error occurs
-
wasNull
public boolean wasNull()
- Specified by:
wasNull
in interfaceSQLInput
- Overrides:
wasNull
in classBaseSqlInput
-
-