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 |
---|---|
String |
extractColumnAlias(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)
String extractColumnAlias(ResultSetMetaData metaData, int position) throws SQLException
metaData
- The result set metadataposition
- The column positionSQLException
Copyright © 2018 JBoss by Red Hat. All rights reserved.