Package railo.runtime.sql.old

Examples of railo.runtime.sql.old.ZSelectItem


   
    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);
      }
View Full Code Here

TOP

Related Classes of railo.runtime.sql.old.ZSelectItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.