Package net.snowflake.client.core
Interface SFSqlInput
-
- All Superinterfaces:
SQLInput
- All Known Implementing Classes:
ArrowSqlInput,BaseSqlInput,JsonSqlInput
@SnowflakeJdbcInternalApi public interface SFSqlInput extends SQLInput
This interface extends the standardSQLInputinterface to provide additional methods.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> T[]readArray(Class<T> type)Reads the next attribute in the stream and returns it as aArrayobject.<T> List<T>readList(Class<T> type)Reads the next attribute in the stream and returns it as aListobject.<T> Map<String,T>readMap(Class<T> type)Reads the next attribute in the stream and returns it as aMapobject.<T> TreadObject(Class<T> type, TimeZone tz)Reads the next attribute in the stream and returns it as aObjectobject.TimestampreadTimestamp(TimeZone tz)Reads the next attribute in the stream and returns it as ajava.sql.Timestampobject.static SFSqlInputunwrap(SQLInput sqlInput)Method unwrapping object of class SQLInput to object of class SfSqlInput.-
Methods inherited from interface java.sql.SQLInput
readArray, readAsciiStream, readBigDecimal, readBinaryStream, readBlob, readBoolean, readByte, readBytes, readCharacterStream, readClob, readDate, readDouble, readFloat, readInt, readLong, readNClob, readNString, readObject, readObject, readRef, readRowId, readShort, readSQLXML, readString, readTime, readTimestamp, readURL, wasNull
-
-
-
-
Method Detail
-
unwrap
static SFSqlInput unwrap(SQLInput sqlInput)
Method unwrapping object of class SQLInput to object of class SfSqlInput.- Parameters:
sqlInput- SQLInput to consider.- Returns:
- Object unwrapped to SFSqlInput class.
-
readTimestamp
Timestamp readTimestamp(TimeZone tz) throws SQLException
Reads the next attribute in the stream and returns it as ajava.sql.Timestampobject.- Parameters:
tz- timezone to consider.- Returns:
- the attribute; if the value is SQL
NULL, returnsnull - Throws:
SQLException- if a database access error occurs
-
readObject
<T> T readObject(Class<T> type, TimeZone tz) throws SQLException
Reads the next attribute in the stream and returns it as aObjectobject.- 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
Objectin the Java programming language;nullif the attribute is SQLNULL - Throws:
SQLException- if a database access error occurs
-
readList
<T> List<T> readList(Class<T> type) throws SQLException
Reads the next attribute in the stream and returns it as aListobject.- 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
Listin the Java programming language;nullif the attribute is SQLNULL - Throws:
SQLException- if a database access error occurs
-
readMap
<T> Map<String,T> readMap(Class<T> type) throws SQLException
Reads the next attribute in the stream and returns it as aMapobject.- 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
Mapin the Java programming language;nullif the attribute is SQLNULL - Throws:
SQLException- if a database access error occurs
-
readArray
<T> T[] readArray(Class<T> type) throws SQLException
Reads the next attribute in the stream and returns it as aArrayobject.- 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
Arrayin the Java programming language;nullif the attribute is SQLNULL - Throws:
SQLException- if a database access error occurs
-
-