类 JSqlCountSqlParser
java.lang.Object
org.jeecgframework.minidao.sqlparser.impl.util.JSqlCountSqlParser
sql解析类,提供更智能的count查询sql
- 作者:
- jeecg
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voidaddAggregateFunctions(String functions) 添加到聚合函数,可以是逗号隔开的多个函数前缀getKeyListByContent(String content) 按照动态内容的参数出现顺序,将参数放到List中getSimpleCountSql(String sql) 获取普通的Count-sqlgetSimpleCountSql(String sql, String name) 获取普通的Count-sqlgetSmartCountSql(String sql) 获取智能的countSqlgetSmartCountSql(String sql, String countColumn) 获取智能的countSql 处理body-去order bybooleanisSimpleCount(net.sf.jsqlparser.statement.select.PlainSelect select) 是否可以用简单的count查询方式booleanorderByHashParameters(List<net.sf.jsqlparser.statement.select.OrderByElement> orderByElements) 判断Orderby是否包含参数,有参数的不能去voidprocessFromItem(net.sf.jsqlparser.statement.select.FromItem fromItem) 处理子查询voidprocessPlainSelect(net.sf.jsqlparser.statement.select.PlainSelect plainSelect) 处理PlainSelect类型的selectBodyvoidprocessSelectBody(net.sf.jsqlparser.statement.select.SelectBody selectBody) 处理selectBody去除Order byvoidprocessWithItemsList(List<net.sf.jsqlparser.statement.select.WithItem> withItemsList) 处理WithItemvoidsqlToCount(net.sf.jsqlparser.statement.select.Select select, String name) 将sql转换为count查询
-
字段详细资料
-
KEEP_ORDERBY
- 另请参阅:
-
dynamic
匹配:user.name这样的参数表达式 -
DIAN
-
DIAN_TMP
-
-
构造器详细资料
-
JSqlCountSqlParser
public JSqlCountSqlParser()
-
-
方法详细资料
-
addAggregateFunctions
添加到聚合函数,可以是逗号隔开的多个函数前缀- 参数:
functions-
-
getSmartCountSql
获取智能的countSql- 参数:
sql-- 返回:
-
getSmartCountSql
获取智能的countSql 处理body-去order by- 参数:
sql-countColumn- 列名,默认 0- 返回:
-
getKeyListByContent
按照动态内容的参数出现顺序,将参数放到List中- 参数:
content-- 返回:
-
getSimpleCountSql
获取普通的Count-sql- 参数:
sql- 原查询sql- 返回:
- 返回count查询sql
-
getSimpleCountSql
获取普通的Count-sql- 参数:
sql- 原查询sql- 返回:
- 返回count查询sql
-
sqlToCount
将sql转换为count查询- 参数:
select-
-
isSimpleCount
public boolean isSimpleCount(net.sf.jsqlparser.statement.select.PlainSelect select) 是否可以用简单的count查询方式- 参数:
select-- 返回:
-
processSelectBody
public void processSelectBody(net.sf.jsqlparser.statement.select.SelectBody selectBody) 处理selectBody去除Order by- 参数:
selectBody-
-
processPlainSelect
public void processPlainSelect(net.sf.jsqlparser.statement.select.PlainSelect plainSelect) 处理PlainSelect类型的selectBody- 参数:
plainSelect-
-
processWithItemsList
处理WithItem- 参数:
withItemsList-
-
processFromItem
public void processFromItem(net.sf.jsqlparser.statement.select.FromItem fromItem) 处理子查询- 参数:
fromItem-
-
orderByHashParameters
public boolean orderByHashParameters(List<net.sf.jsqlparser.statement.select.OrderByElement> orderByElements) 判断Orderby是否包含参数,有参数的不能去- 参数:
orderByElements-- 返回:
-