mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser. fixed issue #1311
This commit is contained in:
@@ -20,6 +20,7 @@ import java.util.List;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLExpr;
|
||||
import com.alibaba.druid.sql.ast.SQLObjectImpl;
|
||||
import com.alibaba.druid.sql.ast.SQLOrderBy;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLSelectQueryBlock extends SQLObjectImpl implements SQLSelectQuery {
|
||||
@@ -31,6 +32,7 @@ public class SQLSelectQueryBlock extends SQLObjectImpl implements SQLSelectQuery
|
||||
protected SQLExprTableSource into;
|
||||
protected SQLExpr where;
|
||||
protected SQLSelectGroupByClause groupBy;
|
||||
protected SQLOrderBy orderBy;
|
||||
protected boolean parenthesized = false;
|
||||
|
||||
public SQLSelectQueryBlock(){
|
||||
@@ -70,6 +72,18 @@ public class SQLSelectQueryBlock extends SQLObjectImpl implements SQLSelectQuery
|
||||
}
|
||||
this.where = where;
|
||||
}
|
||||
|
||||
public SQLOrderBy getOrderBy() {
|
||||
return orderBy;
|
||||
}
|
||||
|
||||
public void setOrderBy(SQLOrderBy orderBy) {
|
||||
if (orderBy != null) {
|
||||
orderBy.setParent(this);
|
||||
}
|
||||
|
||||
this.orderBy = orderBy;
|
||||
}
|
||||
|
||||
public int getDistionOption() {
|
||||
return this.distionOption;
|
||||
|
||||
Reference in New Issue
Block a user