程序包 top.lieder

类 PgSQL

java.lang.Object
top.lieder.PgSQL

public class PgSQL extends Object
  • 构造器详细资料

    • PgSQL

      public PgSQL()
  • 方法详细资料

    • select

      public <T extends Map<String, Object>> List<T> select(String sql, Object[] paramList, boolean withCache)
      安全模式 通过PreparedStatement带参数的select,安全模式,参数通过paramList,防止注入
      参数:
      sql - 参数用?代替的PreparedStatement模式SQL
      paramList - 替代?的参数列表
      withCache - 是否加入缓存机制
      返回:
      返回结果
    • selectActivitySeat

      public <T extends Map<String, Object>> List<T> selectActivitySeat(String sql, Object[] paramList, boolean withCache, String keyWord)
    • select

      public <T extends Map<String, Object>> List<T> select(String sql, Object[] paramList, boolean withCache, int type, String keyWord)
    • selectUnsafe

      public <T extends Map<String, Object>> List<T> selectUnsafe(String sql, boolean withCache)
      非安全模式 通过Statement方式select,无法防止注入,只能用于内部select
      参数:
      sql - sql
      withCache - 是否加入缓存机制
      返回:
      返回结果
    • updateCache

      public static void updateCache(String tableName, boolean hardAsyncCache, int type)
    • updateCache

      public static void updateCache(String tableName, boolean hardAsyncCache, Redis redis)
    • update

      public int update(String sql, Object[] paramList, String tableName, boolean refreshAllCache)
      安全模式 通过PreparedStatement带参数的update, insert, remove等,安全模式,参数通过paramList,防止注入
      参数:
      sql - 参数用?代替的PreparedStatement模式SQL
      paramList - 替代?的参数列表
      tableName - 更新涉及的表名,用于清理缓存,可以不包括shame
      refreshAllCache - 是否立即同步(清除)所有缓存,默认选false
      返回:
      返回结果
    • update

      public int update(String sql, Object[] paramList, String tableName)
    • updateActivitySeat

      public int updateActivitySeat(String sql, Object[] paramList, String tableName, boolean refreshAllCache)
    • update

      public int update(String sql, Object[] paramList, String tableName, boolean refreshAllCache, int type)
    • updateBatch

      public int[] updateBatch(String sql, List<Object[]> paramList, String tableName, boolean hardAsyncCache)
      安全模式 通过PreparedStatement带参数的update, insert, remove等,安全模式,参数通过paramList,防止注入
      参数:
      sql - 参数用?代替的PreparedStatement模式SQL
      paramList - 替代?的参数列表
      tableName - 更新涉及的表名,用于清理缓存,可以不包括shame
      hardAsyncCache - 是否立即同步(清除)所有缓存,默认选false
      返回:
      返回结果
    • updateBatch

      public int[] updateBatch(String sql, List<Object[]> paramList, String tableName, boolean hardAsyncCache, int type)