public class SqlLib extends Object implements org.teasoft.bee.osql.BeeSql
| Modifier and Type | Field and Description |
|---|---|
protected static boolean |
openFieldTypeHandler |
| Constructor and Description |
|---|
SqlLib() |
| Modifier and Type | Method and Description |
|---|---|
protected static String |
_toColumnName(String fieldName,
Class entityClass) |
protected void |
addInCache(String sql,
Object rs,
String returnType,
org.teasoft.bee.osql.SuidType suidType,
int resultSetSize) |
int |
batch(String[] sql) |
int |
batch(String[] sql,
int batchSize) |
protected void |
checkClose(Statement stmt,
Connection conn) |
protected void |
clearContext(String sql) |
protected void |
clearContext(String sql_0,
int batchSize,
int len) |
protected void |
clearInCache(String sql,
String returnType,
org.teasoft.bee.osql.SuidType suidType,
int affectRow) |
protected void |
closeConn(Connection conn) |
protected Object |
createObject(Class c) |
org.teasoft.bee.osql.Cache |
getCache() |
protected void |
initRoute(org.teasoft.bee.osql.SuidType suidType,
Class clazz,
String sql) |
long |
insertAndReturnId(String sql) |
protected boolean |
isConfuseDuplicateFieldDB() |
protected boolean |
isJoson(Field field) |
protected Object |
jsonHandlerProcess(Field field,
Object obj,
org.teasoft.bee.osql.type.TypeHandler jsonHandler) |
protected void |
logSelectRows(int size) |
int |
modify(String sql) |
<T> List<T> |
moreTableSelect(String sql,
T entity) |
List<String[]> |
select(String sql) |
<T> List<T> |
select(String sql,
T entity) |
String |
selectFun(String sql)
SQL function: max,min,avg,sum,count.
|
String |
selectJson(String sql) |
List<Map<String,Object>> |
selectMapList(String sql) |
<T> List<T> |
selectSomeField(String sql,
T entity) |
void |
setCache(org.teasoft.bee.osql.Cache cache) |
protected boolean |
updateInfoInCache(String sql,
String returnType,
org.teasoft.bee.osql.SuidType suidType) |
public org.teasoft.bee.osql.Cache getCache()
public void setCache(org.teasoft.bee.osql.Cache cache)
public <T> List<T> select(String sql, T entity)
select in interface org.teasoft.bee.osql.BeeSqlpublic <T> List<T> selectSomeField(String sql, T entity)
selectSomeField in interface org.teasoft.bee.osql.BeeSqlprotected boolean isJoson(Field field)
protected Object jsonHandlerProcess(Field field, Object obj, org.teasoft.bee.osql.type.TypeHandler jsonHandler)
public String selectFun(String sql)
selectFun in interface org.teasoft.bee.osql.BeeSqlpublic List<String[]> select(String sql)
select in interface org.teasoft.bee.osql.BeeSqlpublic List<Map<String,Object>> selectMapList(String sql)
selectMapList in interface org.teasoft.bee.osql.BeeSqlpublic int modify(String sql)
modify in interface org.teasoft.bee.osql.BeeSqlpublic long insertAndReturnId(String sql)
insertAndReturnId in interface org.teasoft.bee.osql.BeeSqlpublic String selectJson(String sql)
selectJson in interface org.teasoft.bee.osql.BeeSqlpublic int batch(String[] sql)
batch in interface org.teasoft.bee.osql.BeeSqlpublic int batch(String[] sql, int batchSize)
batch in interface org.teasoft.bee.osql.BeeSqlprotected void clearContext(String sql_0, int batchSize, int len)
protected void checkClose(Statement stmt, Connection conn)
protected void closeConn(Connection conn)
protected Object createObject(Class c) throws IllegalAccessException, InstantiationException
public <T> List<T> moreTableSelect(String sql, T entity)
moreTableSelect in interface org.teasoft.bee.osql.BeeSqlprotected void addInCache(String sql, Object rs, String returnType, org.teasoft.bee.osql.SuidType suidType, int resultSetSize)
protected boolean updateInfoInCache(String sql, String returnType, org.teasoft.bee.osql.SuidType suidType)
protected void clearInCache(String sql, String returnType, org.teasoft.bee.osql.SuidType suidType, int affectRow)
protected void clearContext(String sql)
protected boolean isConfuseDuplicateFieldDB()
protected void logSelectRows(int size)
Copyright © 2022. All rights reserved.