Class PagerUtils


  • public class PagerUtils
    extends Object
    • Constructor Detail

      • PagerUtils

        public PagerUtils()
    • Method Detail

      • 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 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)