package railo.runtime.functions.query;

import railo.runtime.PageContext;
import railo.runtime.ext.function.Function;
import railo.runtime.type.Query;

/**
 * Implements the CFML Function querynew
 */
public final class QueryColumnCount implements Function {
    public static double call(PageContext pc , Query qry) {
        return qry.getColumns().length;
    }
}
@@ -143,16 +143,53 @@
 e.Query;
+%0Aimport railo.runtime.type.QueryImpl;
 %0A%0A/**%0A *
@@ -353,20 +353,102 @@
 ) %7B%0A    
-    
+%09if(qry instanceof QueryImpl)%0A        %09return ((QueryImpl)qry).getColumnCount();%0A    %09
 return q
@@ -459,16 +459,20 @@
 etColumn
+Name
 s().leng

improve performance for QueryColumnCount