Class PagerUtils

java.lang.Object
com.alibaba.druid.sql.PagerUtils

public class PagerUtils extends Object
  • Constructor Details

    • PagerUtils

      public PagerUtils()
  • Method Details

    • count

      public static String count(String sql, DbType dbType)
    • limit

      public static String limit(String sql, DbType dbType, int offset, int count)
    • limit

      public static String limit(String sql, DbType dbType, int offset, int count, boolean check)
    • limit

      public static String limit(SQLSelect select, DbType dbType, int offset, int count)
    • limit

      public static boolean limit(SQLSelect select, DbType dbType, int offset, int count, boolean check)
    • getLimit

      public static int getLimit(String sql, DbType dbType)
      Retrieves the limit value from the provided SQL query string based on the specified database type.
      Parameters:
      sql - the SQL query string
      dbType - the database type for parsing the SQL query
      Returns:
      the limit value extracted from the SQL query, or -1 if the query does not have a valid limit clause
    • hasUnorderedLimit

      public static boolean hasUnorderedLimit(String sql, DbType dbType)