Package com.exasol.adapter.jdbc
Class ResultSetMetadataReader
- java.lang.Object
-
- com.exasol.adapter.jdbc.ResultSetMetadataReader
-
public class ResultSetMetadataReader extends Object
This class creates a textual description of the result columns of a push-down query.The columns description is necessary to prepare the
IMPORTstatement in which the push-down query is executed.
-
-
Constructor Summary
Constructors Constructor Description ResultSetMetadataReader(Connection connection, ColumnMetadataReader columnMetadataReader)Create a new instance of aResultSetMetadataReader.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringdescribeColumns(String query)Generate a textual description of the result columns of the push-down query.protected static JDBCTypeDescriptiongetJdbcTypeDescription(ResultSetMetaData metadata, int columnNumber)Get the jdbc type description from result set metadata.
-
-
-
Constructor Detail
-
ResultSetMetadataReader
public ResultSetMetadataReader(Connection connection, ColumnMetadataReader columnMetadataReader)
Create a new instance of aResultSetMetadataReader.- Parameters:
connection- connection to the remote data sourcecolumnMetadataReader- column metadata reader used to translate the column types
-
-
Method Detail
-
describeColumns
public String describeColumns(String query)
Generate a textual description of the result columns of the push-down query.- Parameters:
query- push-down query- Returns:
- string describing the columns (names and types)
-
getJdbcTypeDescription
protected static JDBCTypeDescription getJdbcTypeDescription(ResultSetMetaData metadata, int columnNumber) throws SQLException
Get the jdbc type description from result set metadata.- Parameters:
metadata- result set metadatacolumnNumber- column number to read- Returns:
- JDBC type description
- Throws:
SQLException- if reading fails
-
-