mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved PageUtils & support natural join. issue #1711
This commit is contained in:
@@ -572,8 +572,14 @@ public class PagerUtils {
|
||||
if (parent instanceof SQLSelectQuery) {
|
||||
if (parent instanceof OracleSelectQueryBlock) {
|
||||
OracleSelectQueryBlock queryBlock = (OracleSelectQueryBlock) parent;
|
||||
if (queryBlock.getFrom() instanceof SQLExprTableSource) {
|
||||
SQLTableSource from = queryBlock.getFrom();
|
||||
if (from instanceof SQLExprTableSource) {
|
||||
selectQuery = queryBlock;
|
||||
} else if (from instanceof SQLSubqueryTableSource) {
|
||||
SQLSelect subSelect = ((SQLSubqueryTableSource) from).getSelect();
|
||||
if (subSelect.getQuery() instanceof OracleSelectQueryBlock) {
|
||||
selectQuery = (OracleSelectQueryBlock) subSelect.getQuery();
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -581,6 +587,7 @@ public class PagerUtils {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (selectQuery != null) {
|
||||
SQLObject parent = selectQuery.getParent();
|
||||
if (parent instanceof SQLSelect) {
|
||||
|
||||
Reference in New Issue
Block a user