public Query execute(PageContext pc,SQL sql,int maxrows,int fetchsize,TimeSpan timeout) throws PageException {
  Stopwatch stopwatch=new Stopwatch(Stopwatch.UNIT_NANO);
  stopwatch.start();
  String prettySQL=null;
  Selects selects=null;
  try {
    SelectParser parser=new SelectParser();
    selects=parser.parse(sql.getSQLString());
    Query q=qoq.execute(pc,sql,selects,maxrows);
    q.setExecutionTime(stopwatch.time());
    return q;
  }
 catch (  SQLParserException spe) {
    prettySQL=SQLPrettyfier.prettyfie(sql.getSQLString());
    try {
      Query query=executer.execute(pc,sql,prettySQL,maxrows);
      query.setExecutionTime(stopwatch.time());
      return query;
    }
 catch (    PageException ex) {
    }
  }
catch (  PageException e) {
  }
  try {
    boolean isUnion=false;
    Set<String> tables=null;
    if (selects != null) {
      HSQLUtil2 hsql2=new HSQLUtil2(selects);
      isUnion=hsql2.isUnion();
      tables=hsql2.getInvokedTables();
    }
 else {
      if (prettySQL == null)       prettySQL=SQLPrettyfier.prettyfie(sql.getSQLString());
      HSQLUtil hsql=new HSQLUtil(prettySQL);
      tables=hsql.getInvokedTables();
      isUnion=hsql.isUnion();
    }
    String strSQL=StringUtil.replace(sql.getSQLString(),"[","",false);
    strSQL=StringUtil.replace(strSQL,"]","",false);
    sql.setSQLString(strSQL);
    return _execute(pc,sql,maxrows,fetchsize,timeout,stopwatch,tables,isUnion);
  }
 catch (  ParseException e) {
    throw new DatabaseException(e.getMessage(),null,sql,null);
  }
}

public Query execute ( PageContext pc , SQL sql , int maxrows , int fetchsize , TimeSpan timeout ) throws PageException { Stopwatch stopwatch = new Stopwatch ( Stopwatch . UNIT_NANO ) ; stopwatch . start ( ) ; String prettySQL = null ; Selects selects = null ; try { SelectParser parser = new SelectParser ( ) ; selects = parser . parse ( sql . getSQLString ( ) ) ; Query q = qoq . execute ( pc , sql , selects , maxrows ) ; q . setExecutionTime ( stopwatch . time ( ) ) ; return q ; } catch ( SQLParserException spe ) { prettySQL = SQLPrettyfier . prettyfie ( sql . getSQLString ( ) ) ; try { Query query = executer . execute ( pc , sql , prettySQL , maxrows ) ; query . setExecutionTime ( stopwatch . time ( ) ) ; return query ; } catch ( PageException ex ) { } } catch ( PageException e ) { } try { boolean isUnion = false ; Set < String > tables = null ; if ( selects != null ) { HSQLUtil2 hsql2 = new HSQLUtil2 ( selects ) ; isUnion = hsql2 . isUnion ( ) ; tables = hsql2 . getInvokedTables ( ) ; } else { if ( prettySQL == null ) prettySQL = SQLPrettyfier . prettyfie ( sql . getSQLString ( ) ) ; HSQLUtil hsql = new HSQLUtil ( prettySQL ) ; tables = hsql . getInvokedTables ( ) ; isUnion = hsql . isUnion ( ) ; } String strSQL = StringUtil . replace ( sql . getSQLString ( ) , "[" , "" , false ) ; strSQL = StringUtil . replace ( strSQL , "]" , "" , false ) ; sql . setSQLString ( strSQL ) ; return _execute ( pc , sql , maxrows , fetchsize , timeout , stopwatch , tables , isUnion ) ; } catch ( ParseException e ) { throw new DatabaseException ( e . getMessage ( ) , null , sql , null ) ; } }
executes a query on the queries inside the cld fusion enviroment
