Package com.alibaba.druid.sql
Class PagerUtils
- java.lang.Object
-
- com.alibaba.druid.sql.PagerUtils
-
public class PagerUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description PagerUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringcount(String sql, DbType dbType)static intgetLimit(String sql, DbType dbType)Retrieves the limit value from the provided SQL query string based on the specified database type.static booleanhasUnorderedLimit(String sql, DbType dbType)static Stringlimit(SQLSelect select, DbType dbType, int offset, int count)static booleanlimit(SQLSelect select, DbType dbType, int offset, int count, boolean check)static Stringlimit(String sql, DbType dbType, int offset, int count)static Stringlimit(String sql, DbType dbType, int offset, int count, boolean check)
-
-
-
Method Detail
-
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 stringdbType- 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
-
-