程序包 top.lieder
类 PgSQL
java.lang.Object
top.lieder.PgSQL
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明安全模式 通过PreparedStatement带参数的select,安全模式,参数通过paramList,防止注入selectActivitySeat(String sql, Object[] paramList, boolean withCache, String keyWord) selectUnsafe(String sql, boolean withCache) 非安全模式 通过Statement方式select,无法防止注入,只能用于内部selectintint安全模式 通过PreparedStatement带参数的update, insert, remove等,安全模式,参数通过paramList,防止注入intintupdateActivitySeat(String sql, Object[] paramList, String tableName, boolean refreshAllCache) int[]updateBatch(String sql, List<Object[]> paramList, String tableName, boolean hardAsyncCache) 安全模式 通过PreparedStatement带参数的update, insert, remove等,安全模式,参数通过paramList,防止注入int[]updateBatch(String sql, List<Object[]> paramList, String tableName, boolean hardAsyncCache, int type) static voidupdateCache(String tableName, boolean hardAsyncCache, int type) static voidupdateCache(String tableName, boolean hardAsyncCache, Redis redis)
-
构造器详细资料
-
PgSQL
public PgSQL()
-
-
方法详细资料
-
select
public <T extends Map<String,Object>> List<T> select(String sql, Object[] paramList, boolean withCache) 安全模式 通过PreparedStatement带参数的select,安全模式,参数通过paramList,防止注入- 参数:
sql- 参数用?代替的PreparedStatement模式SQLparamList- 替代?的参数列表withCache- 是否加入缓存机制- 返回:
- 返回结果
-
selectActivitySeat
-
select
-
selectUnsafe
非安全模式 通过Statement方式select,无法防止注入,只能用于内部select- 参数:
sql- sqlwithCache- 是否加入缓存机制- 返回:
- 返回结果
-
updateCache
-
updateCache
-
update
安全模式 通过PreparedStatement带参数的update, insert, remove等,安全模式,参数通过paramList,防止注入- 参数:
sql- 参数用?代替的PreparedStatement模式SQLparamList- 替代?的参数列表tableName- 更新涉及的表名,用于清理缓存,可以不包括shamerefreshAllCache- 是否立即同步(清除)所有缓存,默认选false- 返回:
- 返回结果
-
update
-
updateActivitySeat
-
update
-
updateBatch
public int[] updateBatch(String sql, List<Object[]> paramList, String tableName, boolean hardAsyncCache) 安全模式 通过PreparedStatement带参数的update, insert, remove等,安全模式,参数通过paramList,防止注入- 参数:
sql- 参数用?代替的PreparedStatement模式SQLparamList- 替代?的参数列表tableName- 更新涉及的表名,用于清理缓存,可以不包括shamehardAsyncCache- 是否立即同步(清除)所有缓存,默认选false- 返回:
- 返回结果
-
updateBatch
-