public class SQLHelper extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
getCount(org.apache.ibatis.mapping.MappedStatement mappedStatement,
org.apache.ibatis.transaction.Transaction transaction,
Object parameterObject,
org.apache.ibatis.mapping.BoundSql boundSql,
Dialect dialect)
查询总纪录数
|
static boolean |
isIncludeDistinct(String sql)
是否包含Distinct
|
static String |
removeOrders(String sql)
去除hql的orderby 子句,用于pagedQuery.
|
public static int getCount(org.apache.ibatis.mapping.MappedStatement mappedStatement,
org.apache.ibatis.transaction.Transaction transaction,
Object parameterObject,
org.apache.ibatis.mapping.BoundSql boundSql,
Dialect dialect)
throws SQLException
mappedStatement - mappedtransaction - transactionparameterObject - 参数boundSql - boundSqldialect - database dialectSQLException - sql查询错误public static String removeOrders(String sql)
sql - sql语句public static boolean isIncludeDistinct(String sql)
sql - sql语句Copyright © 2020. All rights reserved.