Menu

#23 automatically assign allias

open
nobody
None
5
2012-03-15
2012-03-15
No

when a select expression doesn't have an allias specified then it will be null.
For example:
SELECT count(fieldName) as count, fieldName FROM clazz GROUP BY fieldName LIMIT 1,1
parsing this query and using the getColumn methods will get me an ArrayList with two SelectExpressions with the following alliases:
count
null.
I'd like to see here something like:
count, fieldName
Or
count, column2
Or anything OTHER than null.
There is no way of getting the fieldName from the query other than substringing the toString() result (which is a horrible idea snice it could change at any given time)

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.