Map<String,Object> selects=MapFactory.<String,Object>getConcurrentMap();
boolean isSMS=false;
// headers
for(int i=0;i<selCount;i++) {
ZSelectItem select=(ZSelectItem) vSelects.get(i);
if(select.isWildcard() || (isSMS=select.getColumn().equals(SQLPrettyfier.PLACEHOLDER_ASTERIX))) {
if(!isSMS && !select.getColumn().equals("*"))
throw new DatabaseException("can't execute this type of query at the moment",null,sql,null);
//Collection.Key[] keys = qr.keys();
Iterator<Key> it = qr.keyIterator();
Key k;
while(it.hasNext()){
k = it.next();
selects.put(k.getString(),k.getString());
}
isSMS=false;
}
else {
//if(SQLPrettyfier.PLACEHOLDER_COUNT.equals(select.getAlias())) select.setAlias("count");
//if(SQLPrettyfier.PLACEHOLDER_COUNT.equals(select.getColumn())) select.setExpression(new ZConstant("count",ZConstant.COLUMNNAME));
String alias=select.getAlias();
String column=select.getColumn();
if(alias==null)alias=column;
alias=alias.toLowerCase();
selects.put(alias,select);
}