| java.lang.Object org.lateralnz.c3d.util.DBUtils
Method Summary | |
final public static int | countSelects(List l) | final public static Column | createColumn(ResultSet rs, int[] types, int idx) | final public static Column | createColumn(String value) | final public static Column[] | createRow(String[] values) | final public static String | flatten(Column[] cols, String delim) | final public static String | getCacheNameFromKey(String key) | final public static String | getInsertTableName(String sql) | final public static String[] | getKeyColumnData(int[] keyColumns, ResultSet rs) return the column data based on an array of primary key columns. | final public static Object | getObjectFromMap(Object key, Map m, Class newObjClass) | final public static String | getResultSetDataKey(String cache, String[] keyColumns) | final public static String | getTargetName(String sql, int type) | final public static String | getWhereClause(String sql) | final public static boolean | isStatementType(String s, int type) | final public static void | setParams(PreparedStatement ps, Column[] cols, int offset, int length) | final public static List | splitSQL(String s) | final public static Map | splitSet(String setSQL) |
CLEAR_CACHE_STATEMENT | final public static int CLEAR_CACHE_STATEMENT(Code) | | |
DELETE_STATEMENT | final public static int DELETE_STATEMENT(Code) | | |
INSERT_STATEMENT | final public static int INSERT_STATEMENT(Code) | | |
QUERY_CACHE_DUMP_STATEMENT | final public static int QUERY_CACHE_DUMP_STATEMENT(Code) | | |
QUERY_CACHE_STATEMENT | final public static int QUERY_CACHE_STATEMENT(Code) | | |
QUERY_STATS_STATEMENT | final public static int QUERY_STATS_STATEMENT(Code) | | |
SELECT_STATEMENT | final public static int SELECT_STATEMENT(Code) | | |
UPDATE_STATEMENT | final public static int UPDATE_STATEMENT(Code) | | |
countSelects | final public static int countSelects(List l)(Code) | | count the selects that appear in a list of SQL statements
|
createColumn | final public static Column createColumn(ResultSet rs, int[] types, int idx) throws SQLException(Code) | | create a column object from the resultset using an array of db types and the index
of the column we're creating
|
getKeyColumnData | final public static String[] getKeyColumnData(int[] keyColumns, ResultSet rs) throws SQLException(Code) | | return the column data based on an array of primary key columns.
For example, if the primary keys are in columns 1, 5 and 6 of the resultset,
this will return the data in those columns as a 3 element array.
|
getWhereClause | final public static String getWhereClause(String sql)(Code) | | get the where clause of an SQL statement
|
isStatementType | final public static boolean isStatementType(String s, int type)(Code) | | |
setParams | final public static void setParams(PreparedStatement ps, Column[] cols, int offset, int length) throws SQLException(Code) | | given an array of Column objects set the values of those columns as parameters in
a prepared statement
|
splitSQL | final public static List splitSQL(String s)(Code) | | split an SQL statement into SQL fragments separated by ;
for example, select * from table1;insert into table2
should result in 2 separate statements
|
|
|