Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.1.9
-
None
-
ALL
-
Sprint connector/j 1.3.0
Description
Like CONJ-149, column alias display feature need.
as_is
select col_1 as col_A from test_table;
|
: getColumnName return col_1 |
 |
i need feature about useOldAliasMetadataBehavior option (like CONJ-149 TABLE)
when useOldAliasMetadataBehavior is true
select col_1 as col_A from test_table;
|
: getColumnName return col_A |
that make column label name display instead column name when useOldAliasMetadataBehavior option true
how about my idea,
and sample my code is below
MySQLResultSetMetaData.java
public String getColumnName(final int column) throws SQLException { |
String s = getColumnInformation(column).getOriginalName();
|
+ if (returnTableAlias == true) // if useOldAliasMetadataBehavior=true then getColumnName return getCoulmnLabel |
+ s = getColumnLabel(column);
|
|
if ("".equals(s)) // odd things that are no columns, e.g count(*) |
s = getColumnLabel(column);
|
return s; |
}
|
Attachments
Issue Links
- relates to
-
CONJ-149 ResultSetMetaData.getTableName returns table alias instead of real table name
- Closed