public interface ColumnAliasExtractor
ResultSetMetaData
. This is used during the
"auto discovery" phase of native SQL queries.
Generally this should be done via ResultSetMetaData.getColumnLabel(int)
, but not all drivers do this correctly.Modifier and Type | Field and Description |
---|---|
static ColumnAliasExtractor |
COLUMN_LABEL_EXTRACTOR
An extractor which uses
ResultSetMetaData.getColumnLabel(int) |
static ColumnAliasExtractor |
COLUMN_NAME_EXTRACTOR
An extractor which uses
ResultSetMetaData.getColumnName(int) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
extractColumnAlias(java.sql.ResultSetMetaData metaData,
int position)
Extract the unique column alias.
|
static final ColumnAliasExtractor COLUMN_LABEL_EXTRACTOR
ResultSetMetaData.getColumnLabel(int)
static final ColumnAliasExtractor COLUMN_NAME_EXTRACTOR
ResultSetMetaData.getColumnName(int)
java.lang.String extractColumnAlias(java.sql.ResultSetMetaData metaData, int position) throws java.sql.SQLException
metaData
- The result set metadataposition
- The column positionjava.sql.SQLException
- Indicates a problem accessing the JDBC ResultSetMetaDataCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.