类 PostgreSqlDialectUtils
- java.lang.Object
-
- org.sagacity.sqltoy.dialect.utils.PostgreSqlDialectUtils
-
public class PostgreSqlDialectUtils extends Object
- 版本:
- v1.0,Date:2015年3月5日
- 作者:
- zhongxuchen
-
-
字段概要
字段 修饰符和类型 字段 说明 static StringNVL_FUNCTION判定为null的函数
-
构造器概要
构造器 构造器 说明 PostgreSqlDialectUtils()
-
方法概要
所有方法 静态方法 具体方法 已过时的方法 修饰符和类型 方法 说明 static QueryResultgetRandomResult(SqlToyContext sqlToyContext, SqlToyConfig sqlToyConfig, QueryExecutor queryExecutor, DecryptHandler decryptHandler, Long totalCount, Long randomCount, Connection conn, Integer dbType, String dialect, int fetchSize, int maxRows)static StringgetSaveOrUpdateSql(Integer dbType, EntityMeta entityMeta, PKStrategy pkStrategy, boolean isAssignPK, String sequence, String[] forceUpdateFields, String tableName)已过时。static booleanisAssignPKValue(PKStrategy pkStrategy)static Objectsave(SqlToyContext sqlToyContext, Serializable entity, Connection conn, Integer dbType, String tableName)static LongsaveAll(SqlToyContext sqlToyContext, List<?> entities, int batchSize, ReflectPropsHandler reflectPropsHandler, Connection conn, Integer dbType, Boolean autoCommit, String tableName)static LongsaveOrUpdateAll(SqlToyContext sqlToyContext, List<?> entities, int batchSize, ReflectPropsHandler reflectPropsHandler, String[] forceUpdateFields, Connection conn, Integer dbType, String dialect, Boolean autoCommit, String tableName)static voidwrapSelectFields(StringBuilder sql, String columnName, FieldMeta fieldMeta)
-
-
-
方法详细资料
-
getRandomResult
public static QueryResult getRandomResult(SqlToyContext sqlToyContext, SqlToyConfig sqlToyConfig, QueryExecutor queryExecutor, DecryptHandler decryptHandler, Long totalCount, Long randomCount, Connection conn, Integer dbType, String dialect, int fetchSize, int maxRows) throws Exception
- 参数:
sqlToyContext-sqlToyConfig-queryExecutor-totalCount-randomCount-conn-dbType-dialect-fetchSize-maxRows-- 返回:
- 抛出:
Exception
-
save
public static Object save(SqlToyContext sqlToyContext, Serializable entity, Connection conn, Integer dbType, String tableName) throws Exception
- 参数:
sqlToyContext-entity-conn-dbType-tableName-- 返回:
- 抛出:
Exception
-
saveAll
public static Long saveAll(SqlToyContext sqlToyContext, List<?> entities, int batchSize, ReflectPropsHandler reflectPropsHandler, Connection conn, Integer dbType, Boolean autoCommit, String tableName) throws Exception
- 参数:
sqlToyContext-entities-batchSize-reflectPropsHandler-conn-dbType-autoCommit-tableName-- 返回:
- 抛出:
Exception
-
saveOrUpdateAll
public static Long saveOrUpdateAll(SqlToyContext sqlToyContext, List<?> entities, int batchSize, ReflectPropsHandler reflectPropsHandler, String[] forceUpdateFields, Connection conn, Integer dbType, String dialect, Boolean autoCommit, String tableName) throws Exception
- 参数:
sqlToyContext-entities-batchSize-reflectPropsHandler-forceUpdateFields-conn-dbType-dialect-autoCommit-tableName-- 返回:
- 抛出:
Exception
-
getSaveOrUpdateSql
@Deprecated public static String getSaveOrUpdateSql(Integer dbType, EntityMeta entityMeta, PKStrategy pkStrategy, boolean isAssignPK, String sequence, String[] forceUpdateFields, String tableName)
已过时。- 参数:
dbType-entityMeta-pkStrategy-sequence-forceUpdateFields-tableName-- 返回:
-
wrapSelectFields
public static void wrapSelectFields(StringBuilder sql, String columnName, FieldMeta fieldMeta)
- 参数:
sql-columnName-fieldMeta-
-
isAssignPKValue
public static boolean isAssignPKValue(PKStrategy pkStrategy)
- 参数:
pkStrategy-- 返回:
-
-