Class DatabricksResultSetMetaData
java.lang.Object
com.databricks.jdbc.api.impl.DatabricksResultSetMetaData
- All Implemented Interfaces:
ResultSetMetaData,Wrapper
-
Field Summary
Fields inherited from interface java.sql.ResultSetMetaData
columnNoNulls, columnNullable, columnNullableUnknown -
Constructor Summary
ConstructorsConstructorDescriptionDatabricksResultSetMetaData(StatementId statementId, TGetResultSetMetadataResp resultManifest, long rows, long chunkCount, List<String> arrowMetadata, IDatabricksConnectionContext ctx) Constructs aDatabricksResultSetMetaDataobject for a Thrift-based result set.DatabricksResultSetMetaData(StatementId statementId, ResultManifest resultManifest, boolean usesExternalLinks, IDatabricksConnectionContext ctx) Constructs aDatabricksResultSetMetaDataobject for a SEA result set.DatabricksResultSetMetaData(StatementId statementId, List<ColumnMetadata> columnMetadataList, long totalRows) Constructs aDatabricksResultSetMetaDataobject for metadata result set (SEA Flow)DatabricksResultSetMetaData(StatementId statementId, List<String> columnNames, List<String> columnTypeText, int[] columnTypes, int[] columnTypePrecisions, int[] isNullables, long totalRows) Constructs aDatabricksResultSetMetaDataobject for predefined metadata result set.DatabricksResultSetMetaData(StatementId statementId, List<String> columnNames, List<String> columnDataTypes, IDatabricksConnectionContext ctx) Constructs aDatabricksResultSetMetaDataobject for metadata result set obtained from DESCRIBE QUERY Works for both SEA and Thrift flows as result set obtained from DESCRIBE QUERY is already parsed.DatabricksResultSetMetaData(StatementId statementId, List<String> columnNames, List<String> columnTypeText, List<Integer> columnTypes, List<Integer> columnTypePrecisions, List<Nullable> columnNullables, long totalRows) Constructs aDatabricksResultSetMetaDataobject for metadata result set (Thrift Flow) -
Method Summary
Modifier and TypeMethodDescriptiongetCatalogName(int column) getColumnClassName(int column) intintgetColumnDisplaySize(int column) getColumnLabel(int column) getColumnName(int column) intgetColumnNameIndex(String columnName) Returns index of column-name in metadata starting from 1intgetColumnType(int column) getColumnTypeName(int column) booleanintgetPrecision(int column) int[]getPrecisionAndScale(ColumnInfo columnInfo) int[]getPrecisionAndScale(ColumnInfo columnInfo, int columnType) int[]getPrecisionAndScale(String columnTypeText, int columnType) intgetScale(int column) getSchemaName(int column) getTableName(int column) longbooleanisAutoIncrement(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> T
-
Constructor Details
-
DatabricksResultSetMetaData
public DatabricksResultSetMetaData(StatementId statementId, ResultManifest resultManifest, boolean usesExternalLinks, IDatabricksConnectionContext ctx) Constructs aDatabricksResultSetMetaDataobject for a SEA result set.- Parameters:
statementId- the unique identifier of the SQL statement executionresultManifest- the manifest containing metadata about the result set, including column information and typesusesExternalLinks- whether or not the resultData contains external links (cloud fetch is used)
-
DatabricksResultSetMetaData
public DatabricksResultSetMetaData(StatementId statementId, TGetResultSetMetadataResp resultManifest, long rows, long chunkCount, List<String> arrowMetadata, IDatabricksConnectionContext ctx) Constructs aDatabricksResultSetMetaDataobject for a Thrift-based result set.- Parameters:
statementId- the unique identifier of the SQL statement executionresultManifest- the response containing metadata about the result set, including column information and types, obtained through the Thrift protocolrows- the total number of rows in the result setchunkCount- the total number of data chunks in the result set
-
DatabricksResultSetMetaData
public DatabricksResultSetMetaData(StatementId statementId, List<ColumnMetadata> columnMetadataList, long totalRows) Constructs aDatabricksResultSetMetaDataobject for metadata result set (SEA Flow)- Parameters:
statementId- the unique identifier of the SQL statement executioncolumnMetadataList- the list containing metadata for each column in the result set, such as column names, types, and precisiontotalRows- the total number of rows in the result set
-
DatabricksResultSetMetaData
public DatabricksResultSetMetaData(StatementId statementId, List<String> columnNames, List<String> columnTypeText, List<Integer> columnTypes, List<Integer> columnTypePrecisions, List<Nullable> columnNullables, long totalRows) Constructs aDatabricksResultSetMetaDataobject for metadata result set (Thrift Flow)- Parameters:
statementId- the unique identifier of the SQL statement executioncolumnNames- names of each columncolumnTypeText- type text of each columncolumnTypes- types of each columncolumnTypePrecisions- precisions of each columncolumnNullables- nullable value of each columntotalRows- total number of rows in result set
-
DatabricksResultSetMetaData
public DatabricksResultSetMetaData(StatementId statementId, List<String> columnNames, List<String> columnTypeText, int[] columnTypes, int[] columnTypePrecisions, int[] isNullables, long totalRows) Constructs aDatabricksResultSetMetaDataobject for predefined metadata result set.- Parameters:
statementId- the unique identifier of the SQL statement executioncolumnNames- the names of each columncolumnTypeText- the textual representation of the column typescolumnTypes- the integer values representing the SQL types of each columncolumnTypePrecisions- the precisions of each columnisNullables- the nullability status of each columntotalRows- the total number of rows in the result set
-
DatabricksResultSetMetaData
public DatabricksResultSetMetaData(StatementId statementId, List<String> columnNames, List<String> columnDataTypes, IDatabricksConnectionContext ctx) Constructs aDatabricksResultSetMetaDataobject for metadata result set obtained from DESCRIBE QUERY Works for both SEA and Thrift flows as result set obtained from DESCRIBE QUERY is already parsed.- Parameters:
statementId- the unique identifier of the SQL statement executioncolumnNames- names of each columncolumnDataTypes- types of each columnctx- connection context
-
-
Method Details
-
getColumnCount
- Specified by:
getColumnCountin interfaceResultSetMetaData- Throws:
SQLException
-
isAutoIncrement
- Specified by:
isAutoIncrementin interfaceResultSetMetaData- Throws:
SQLException
-
isCaseSensitive
- Specified by:
isCaseSensitivein interfaceResultSetMetaData- Throws:
SQLException
-
isSearchable
- Specified by:
isSearchablein interfaceResultSetMetaData- Throws:
SQLException
-
isCurrency
- Specified by:
isCurrencyin interfaceResultSetMetaData- Throws:
SQLException
-
isNullable
- Specified by:
isNullablein interfaceResultSetMetaData- Throws:
SQLException
-
isSigned
- Specified by:
isSignedin interfaceResultSetMetaData- Throws:
SQLException
-
getColumnDisplaySize
- Specified by:
getColumnDisplaySizein interfaceResultSetMetaData- Throws:
SQLException
-
getColumnLabel
- Specified by:
getColumnLabelin interfaceResultSetMetaData- Throws:
SQLException
-
getColumnName
- Specified by:
getColumnNamein interfaceResultSetMetaData- Throws:
SQLException
-
getSchemaName
- Specified by:
getSchemaNamein interfaceResultSetMetaData- Throws:
SQLException
-
getPrecision
- Specified by:
getPrecisionin interfaceResultSetMetaData- Throws:
SQLException
-
getScale
- Specified by:
getScalein interfaceResultSetMetaData- Throws:
SQLException
-
getTableName
- Specified by:
getTableNamein interfaceResultSetMetaData- Throws:
SQLException
-
getCatalogName
- Specified by:
getCatalogNamein interfaceResultSetMetaData- Throws:
SQLException
-
getColumnType
- Specified by:
getColumnTypein interfaceResultSetMetaData- Throws:
SQLException
-
getColumnTypeName
- Specified by:
getColumnTypeNamein interfaceResultSetMetaData- Throws:
SQLException
-
isReadOnly
- Specified by:
isReadOnlyin interfaceResultSetMetaData- Throws:
SQLException
-
isWritable
- Specified by:
isWritablein interfaceResultSetMetaData- Throws:
SQLException
-
isDefinitelyWritable
- Specified by:
isDefinitelyWritablein interfaceResultSetMetaData- Throws:
SQLException
-
getColumnClassName
- Specified by:
getColumnClassNamein interfaceResultSetMetaData- Throws:
SQLException
-
unwrap
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
getColumnNameIndex
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() -
getIsCloudFetchUsed
public boolean getIsCloudFetchUsed() -
getChunkCount
-
getPrecisionAndScale
-
getPrecisionAndScale
-
getPrecisionAndScale
-