String strQF=((String) queryFormat).trim();
if(strQF.equalsIgnoreCase("row"));
else if(strQF.equalsIgnoreCase("column"))byColumn=true;
else throw new ApplicationException("invalid queryformat definition ["+strQF+"], valid formats are [row,column]");
}
JSONConverter converter = new JSONConverter(false);
String prefix="";
if(props.secureJson) {
prefix=pc.getApplicationContext().getSecureJsonPrefix();
if(prefix==null)prefix="";
}
pc.forceWrite(prefix+converter.serialize(pc,rtn,byColumn));
}
// CFML
else if(UDF.RETURN_FORMAT_SERIALIZE==props.format) {
ScriptConverter converter = new ScriptConverter(false);
pc.forceWrite(converter.serialize(rtn));
}
// XML
else if(UDF.RETURN_FORMAT_XML==props.format) {
XMLConverter converter = new XMLConverter(pc.getTimeZone(),false);
converter.setTimeZone(pc.getTimeZone());
pc.forceWrite(converter.serialize(rtn));
}
// Plain
else if(UDF.RETURN_FORMAT_PLAIN==props.format) {
pc.forceWrite(Caster.toString(rtn));
}