Package com.databricks.jdbc.core
Class DatabricksResultSetMetaData
- java.lang.Object
-
- com.databricks.jdbc.core.DatabricksResultSetMetaData
-
- All Implemented Interfaces:
ResultSetMetaData,Wrapper
public class DatabricksResultSetMetaData extends Object implements ResultSetMetaData
-
-
Field Summary
-
Fields inherited from interface java.sql.ResultSetMetaData
columnNoNulls, columnNullable, columnNullableUnknown
-
-
Constructor Summary
Constructors Constructor Description DatabricksResultSetMetaData(String statementId, TGetResultSetMetadataResp resultManifest, long rows, long chunkCount)DatabricksResultSetMetaData(String statementId, ResultManifest resultManifest)DatabricksResultSetMetaData(String statementId, List<String> columnNames, List<String> columnTypeText, List<Integer> columnTypes, List<Integer> columnTypePrecisions, long totalRows)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCatalogName(int column)LonggetChunkCount()StringgetColumnClassName(int column)intgetColumnCount()intgetColumnDisplaySize(int column)StringgetColumnLabel(int column)StringgetColumnName(int column)intgetColumnNameIndex(String columnName)Returns index of column-name in metadata starting from 1intgetColumnType(int column)StringgetColumnTypeName(int column)intgetPrecision(int column)intgetScale(int column)int[]getScaleAndPrecision(TColumnDesc columnInfo, com.databricks.sdk.service.sql.ColumnInfoTypeName columnTypeName)int[]getScaleAndPrecision(com.databricks.sdk.service.sql.ColumnInfo columnInfo, com.databricks.sdk.service.sql.ColumnInfoTypeName columnTypeName)StringgetSchemaName(int column)StringgetTableName(int column)longgetTotalRows()booleanisAutoIncrement(int column)booleanisCaseSensitive(int column)booleanisCurrency(int column)booleanisDefinitelyWritable(int column)intisNullable(int column)booleanisReadOnly(int column)booleanisSearchable(int column)booleanisSigned(int column)booleanisWrapperFor(Class<?> iface)booleanisWritable(int column)<T> Tunwrap(Class<T> iface)
-
-
-
Constructor Detail
-
DatabricksResultSetMetaData
public DatabricksResultSetMetaData(String statementId, ResultManifest resultManifest)
-
DatabricksResultSetMetaData
public DatabricksResultSetMetaData(String statementId, TGetResultSetMetadataResp resultManifest, long rows, long chunkCount)
-
-
Method Detail
-
getColumnCount
public int getColumnCount() throws SQLException- Specified by:
getColumnCountin interfaceResultSetMetaData- Throws:
SQLException
-
isAutoIncrement
public boolean isAutoIncrement(int column) throws SQLException- Specified by:
isAutoIncrementin interfaceResultSetMetaData- Throws:
SQLException
-
isCaseSensitive
public boolean isCaseSensitive(int column) throws SQLException- Specified by:
isCaseSensitivein interfaceResultSetMetaData- Throws:
SQLException
-
isSearchable
public boolean isSearchable(int column) throws SQLException- Specified by:
isSearchablein interfaceResultSetMetaData- Throws:
SQLException
-
isCurrency
public boolean isCurrency(int column) throws SQLException- Specified by:
isCurrencyin interfaceResultSetMetaData- Throws:
SQLException
-
isNullable
public int isNullable(int column) throws SQLException- Specified by:
isNullablein interfaceResultSetMetaData- Throws:
SQLException
-
isSigned
public boolean isSigned(int column) throws SQLException- Specified by:
isSignedin interfaceResultSetMetaData- Throws:
SQLException
-
getColumnDisplaySize
public int getColumnDisplaySize(int column) throws SQLException- Specified by:
getColumnDisplaySizein interfaceResultSetMetaData- Throws:
SQLException
-
getColumnLabel
public String getColumnLabel(int column) throws SQLException
- Specified by:
getColumnLabelin interfaceResultSetMetaData- Throws:
SQLException
-
getColumnName
public String getColumnName(int column) throws SQLException
- Specified by:
getColumnNamein interfaceResultSetMetaData- Throws:
SQLException
-
getSchemaName
public String getSchemaName(int column) throws SQLException
- Specified by:
getSchemaNamein interfaceResultSetMetaData- Throws:
SQLException
-
getPrecision
public int getPrecision(int column) throws SQLException- Specified by:
getPrecisionin interfaceResultSetMetaData- Throws:
SQLException
-
getScale
public int getScale(int column) throws SQLException- Specified by:
getScalein interfaceResultSetMetaData- Throws:
SQLException
-
getTableName
public String getTableName(int column) throws SQLException
- Specified by:
getTableNamein interfaceResultSetMetaData- Throws:
SQLException
-
getCatalogName
public String getCatalogName(int column) throws SQLException
- Specified by:
getCatalogNamein interfaceResultSetMetaData- Throws:
SQLException
-
getColumnType
public int getColumnType(int column) throws SQLException- Specified by:
getColumnTypein interfaceResultSetMetaData- Throws:
SQLException
-
getColumnTypeName
public String getColumnTypeName(int column) throws SQLException
- Specified by:
getColumnTypeNamein interfaceResultSetMetaData- Throws:
SQLException
-
isReadOnly
public boolean isReadOnly(int column) throws SQLException- Specified by:
isReadOnlyin interfaceResultSetMetaData- Throws:
SQLException
-
isWritable
public boolean isWritable(int column) throws SQLException- Specified by:
isWritablein interfaceResultSetMetaData- Throws:
SQLException
-
isDefinitelyWritable
public boolean isDefinitelyWritable(int column) throws SQLException- Specified by:
isDefinitelyWritablein interfaceResultSetMetaData- Throws:
SQLException
-
getColumnClassName
public String getColumnClassName(int column) throws SQLException
- Specified by:
getColumnClassNamein interfaceResultSetMetaData- Throws:
SQLException
-
unwrap
public <T> T unwrap(Class<T> iface) throws SQLException
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
isWrapperFor
public boolean isWrapperFor(Class<?> iface) throws SQLException
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
getColumnNameIndex
public int getColumnNameIndex(String columnName)
Returns index of column-name in metadata starting from 1- Parameters:
columnName- column-name- Returns:
- index of column if exists, else -1
-
getTotalRows
public long getTotalRows()
-
getChunkCount
public Long getChunkCount()
-
getScaleAndPrecision
public int[] getScaleAndPrecision(com.databricks.sdk.service.sql.ColumnInfo columnInfo, com.databricks.sdk.service.sql.ColumnInfoTypeName columnTypeName)
-
getScaleAndPrecision
public int[] getScaleAndPrecision(TColumnDesc columnInfo, com.databricks.sdk.service.sql.ColumnInfoTypeName columnTypeName)
-
-