railo.runtime.type.util
Class QueryUtil
java.lang.Object
railo.runtime.type.util.QueryUtil
public class QueryUtil
- extends Object
Method Summary |
static void |
checkSQLRestriction(DatasourceConnection dc,
SQL sql)
check if there is a sql restriction |
static QueryColumnImpl |
duplicate2QueryColumnImpl(QueryImpl targetQuery,
QueryColumn col,
boolean deepCopy)
|
static boolean |
execute(PageContext pc,
PreparedStatement ps)
|
static boolean |
execute(PageContext pc,
Statement stat,
boolean createGeneratedKeys,
SQL sql)
|
static String |
getColumnName(ResultSetMetaData meta,
int column)
|
static Collection.Key[] |
getColumnNames(Query qry)
return column names as Key from a query |
static Object |
getObject(ResultSet rs,
int columnIndex,
Class type)
|
static Object |
getObject(ResultSet rs,
String columnLabel,
Class type)
|
static Object |
getValue(QueryColumn column,
int row)
Deprecated. use instead QueryColumn.get(int,Object) |
static void |
removeRows(Query query,
int index,
int count)
|
static long |
sizeOf(QueryColumn column)
|
static DumpData |
toDumpData(Query query,
PageContext pageContext,
int maxlevel,
DumpProperties dp)
|
static String[] |
toStringArray(Collection.Key[] keys)
|
QueryUtil
public QueryUtil()
sizeOf
public static long sizeOf(QueryColumn column)
getColumnNames
public static Collection.Key[] getColumnNames(Query qry)
- return column names as Key from a query
- Parameters:
qry
-
- Returns:
toStringArray
public static String[] toStringArray(Collection.Key[] keys)
checkSQLRestriction
public static void checkSQLRestriction(DatasourceConnection dc,
SQL sql)
throws PageException
- check if there is a sql restriction
- Parameters:
ds
- sql
-
- Throws:
PageException
toDumpData
public static DumpData toDumpData(Query query,
PageContext pageContext,
int maxlevel,
DumpProperties dp)
removeRows
public static void removeRows(Query query,
int index,
int count)
throws PageException
- Throws:
PageException
execute
public static boolean execute(PageContext pc,
Statement stat,
boolean createGeneratedKeys,
SQL sql)
throws SQLException
- Throws:
SQLException
execute
public static boolean execute(PageContext pc,
PreparedStatement ps)
throws SQLException
- Throws:
SQLException
getColumnName
public static String getColumnName(ResultSetMetaData meta,
int column)
throws SQLException
- Throws:
SQLException
getObject
public static Object getObject(ResultSet rs,
int columnIndex,
Class type)
throws SQLException
- Throws:
SQLException
getObject
public static Object getObject(ResultSet rs,
String columnLabel,
Class type)
throws SQLException
- Throws:
SQLException
getValue
public static Object getValue(QueryColumn column,
int row)
- Deprecated. use instead QueryColumn.get(int,Object)
- return the value at the given position (row), returns the default empty value ("" or null) for wrong row or null values.
this method only exist for backward compatibility and should not be used for new functinality
- Parameters:
column
- row
-
- Returns:
duplicate2QueryColumnImpl
public static QueryColumnImpl duplicate2QueryColumnImpl(QueryImpl targetQuery,
QueryColumn col,
boolean deepCopy)
Copyright © 2012 Railo