001 /** 002 * Implements the Cold Fusion Function isquery 003 */ 004 package railo.runtime.functions.query; 005 006 import railo.runtime.PageContext; 007 import railo.runtime.exp.PageException; 008 import railo.runtime.ext.function.Function; 009 import railo.runtime.op.Caster; 010 import railo.runtime.sql.SQLParserException; 011 import railo.runtime.sql.SelectParser; 012 import railo.runtime.sql.Selects; 013 import railo.runtime.type.Struct; 014 import railo.runtime.type.StructImpl; 015 016 public final class SelectParse implements Function { 017 public static Struct call(PageContext pc , String sql) throws PageException { 018 019 try { 020 Selects selects = new SelectParser().parse(sql); 021 Struct sct=new StructImpl(); 022 023 024 025 return sct; 026 } 027 catch (SQLParserException e) { 028 throw Caster.toPageException(e); 029 } 030 } 031 }