1、简单查询
ArrayList<HashMap> prepareSelect(String sql,HashMap<Integer,Object> params);
ArrayList<HashMap> prepareSelect(String sql,Object param1,Object param2,...)
String prepareSelectJson(String sql,HashMap<Integer,Object> params);
String prepareSelectJson(String sql,Object param1,Object param2,...)
ArrayList<B> prepareSelect2b(String sql,HashMap<Integer,Object> params);
ArrayList<B> prepareSelect2b(String sql,Object param1,Object param2,...)
ArrayList<T> prepareSelect(String sql,HashMap<Integer,Object> params,Class<T> t);
ArrayList<T> prepareSelect(String sql,Class<T> t,Object param1,Object param2,...)
String prepareOne(String sql,HashMap<Integer,Object> params)
String prepareOne(String sql,Object param1,Object param2,...)
HashMap<String,String> prepareRows(String sql,HashMap<Integer,Object> params)
HashMap<String,String> prepareRows(String sql,Object param1,Object param2,...)
String prepareRowsJson(String sql,HashMap<Integer,Object> params)
String prepareRowsJson(String sql,Object param1,Object param2,...)
B prepareRows2b(String sql,HashMap<Integer,Object> params)
B prepareRows2b(String sql,Object param1,Object param2,...)
T prepareRows(String sql,HashMap<Integer,Object> params,Class<T> t)
T prepareRows(String sql,Class<T> t,Object param1,Object param2,...)
HashMap<String,Object> prepareRowsObj(String sql,HashMap<Integer,Object> params)
HashMap<String,Object> prepareRowsObj(String sql,Object param1,Object param2,...)
ArrayList<String> prepareCols(String sql,HashMap<Integer,Object> params)
ArrayList<String> prepareCols(String sql,Object param1,Object param2,...)
String prepareColsJson(String sql,HashMap<Integer,Object> params)
String prepareColsJson(String sql,Object param1,Object param2,...)
ArrayList<B> prepareCols2b(String sql,HashMap<Integer,Object> params)
ArrayList<B> prepareCols2b(String sql,Object param1,Object param2,...)
ArrayList<T> prepareCols(String sql,Class<T> t,HashMap<Integer,Object> params)
ArrayList<T> prepareCols(String sql,Class<T> t,Object param1,Object param2,...)
JkasResult preRs(String sql,Object param1,Object param2,...)//返回ResultSet对象,效率最高
int preSelectCount(String sql,Object param1,Object param2,...)//返回记录数
2、简化查询(T代表实体Bean类)
ArrayList<HashMap> prepareSelect(HashMap<Integer,Object> params);
ArrayList<HashMap> prepareSelect(Object param1,Object param2,...)
String prepareSelectJson(HashMap<Integer,Object> params);
String prepareSelectJson(Object param1,Object param2,...)
ArrayList<B> prepareSelect2b(HashMap<Integer,Object> params);
ArrayList<B> prepareSelect2b(Object param1,Object param2,...)
ArrayList<T> prepareSelect(HashMap<Integer,Object> params,Class<T> t);
ArrayList<T> prepareSelect(Class<T> t,Object param1,Object param2,...)
Member m=new Member();
HashMap<Integer,Object> params=new HashMap<Integer,Object>();
params.put(1,1);
m.where("a>?").prepareSelect(params);
String prepareOne(HashMap<Integer,Object> params)
String prepareOne(Object param1,Object param2,...)
HashMap<String,String> prepareRows(HashMap<Integer,Object> params)
HashMap<String,String> prepareRows(Object param1,Object param2,...)
String prepareRowsJson(HashMap<Integer,Object> params)
String prepareRowsJson(Object param1,Object param2,...)
T prepareRows(HashMap<Integer,Object> params,Class<T> t)
T prepareRows(Class<T> t,Object param1,Object param2,...)
HashMap<String,Object> prerpareRowsObj(HashMap<Integer,Object> params)
HashMap<String,Object> prerpareRowsObj(Object param1,Object param2,...)
ArrayList<String> prepareCols(HashMap<Integer,Object> params)
ArrayList<String> prepareCols(Object param1,Object param2,...)
String prepareColsJson(HashMap<Integer,Object> params)
String prepareColsJson(Object param1,Object param2,...)
ArrayList<T> prepareCols(HashMap<Integer,Object> params,Class<T> t)
ArrayList<T> prepareCols(Class<T> t,Object param1,Object param2,...)
preCount(Object... params)//预处理
preCount(String field,Object... params)
int preRecords(Object... params);//返回记录数
int preRecords(String field,Object... params)//返回count(field)记录数
JkasResult preRs(Object param1,Object param2,...)//返回JkasResult(和ResultSet一样)对象,效率最高
案例:
UserM um=new UserM();
JkasResult
jr=um.where("id<?").preRs(5);
if(jr!=null)
{try{
while(jr.next())
{echo(jr.getString(1),jr.getString(2),jr.getString(3));
}
}catch(Exception e){}
}
int preSelectCount(Object param1,Object param2,...)//返回记录数