类 SqlUtilsExt
- java.lang.Object
-
- org.sagacity.sqltoy.utils.SqlUtilsExt
-
public class SqlUtilsExt extends Object
- 版本:
- v1.0,Date:2015年4月22日
- 作者:
- zhongxuchen
-
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static LongbatchUpdateForPOJO(TypeHandler typeHandler, String updateSql, List<Object[]> rowDatas, Integer[] fieldsType, String[] fieldsDefaultValue, Boolean[] fieldsNullable, int batchSize, Boolean autoCommit, Connection conn, Integer dbType)static StringclearOriginalSqlMark(String sql)static ObjectgetDefaultValue(Object paramValue, String defaultValue, int jdbcType, boolean nullable)static Object[]getDefaultValues(EntityMeta entityMeta)static booleanisCurrentTime(String defaultValue)static StringmarkOriginalSql(String originalSql)static StringsignSql(String sql, Integer dbType, SqlToyConfig sqlToyConfig)
-
-
-
方法详细资料
-
batchUpdateForPOJO
public static Long batchUpdateForPOJO(TypeHandler typeHandler, String updateSql, List<Object[]> rowDatas, Integer[] fieldsType, String[] fieldsDefaultValue, Boolean[] fieldsNullable, int batchSize, Boolean autoCommit, Connection conn, Integer dbType) throws Exception
- 参数:
typeHandler-updateSql-rowDatas-fieldsType-fieldsDefaultValue-fieldsNullable-batchSize-autoCommit-conn-dbType-- 返回:
- 抛出:
Exception
-
getDefaultValues
public static Object[] getDefaultValues(EntityMeta entityMeta)
- 参数:
entityMeta-- 返回:
-
getDefaultValue
public static Object getDefaultValue(Object paramValue, String defaultValue, int jdbcType, boolean nullable)
- 参数:
paramValue-defaultValue-jdbcType-nullable-- 返回:
-
isCurrentTime
public static boolean isCurrentTime(String defaultValue)
-
signSql
public static String signSql(String sql, Integer dbType, SqlToyConfig sqlToyConfig)
- 参数:
sql-dbType- 传递过来具体数据库类型,便于对不支持的数据库做区别处理sqlToyConfig-- 返回:
-
-