mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improve sql wall
This commit is contained in:
@@ -15,6 +15,10 @@
|
||||
*/
|
||||
package com.alibaba.druid.sql.ast.statement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLHint;
|
||||
import com.alibaba.druid.sql.ast.SQLObjectImpl;
|
||||
import com.alibaba.druid.sql.ast.SQLOrderBy;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
@@ -25,10 +29,26 @@ public class SQLSelect extends SQLObjectImpl {
|
||||
protected SQLSelectQuery query;
|
||||
protected SQLOrderBy orderBy;
|
||||
|
||||
private List<SQLHint> hints;
|
||||
|
||||
public SQLSelect(){
|
||||
|
||||
}
|
||||
|
||||
public List<SQLHint> getHints() {
|
||||
if (hints == null) {
|
||||
hints = new ArrayList<SQLHint>(2);
|
||||
}
|
||||
return hints;
|
||||
}
|
||||
|
||||
public int getHintsSize() {
|
||||
if (hints == null) {
|
||||
return 0;
|
||||
}
|
||||
return hints.size();
|
||||
}
|
||||
|
||||
public SQLSelect(SQLSelectQuery query){
|
||||
this.setQuery(query);
|
||||
}
|
||||
@@ -64,6 +84,7 @@ public class SQLSelect extends SQLObjectImpl {
|
||||
if (visitor.visit(this)) {
|
||||
acceptChild(visitor, this.query);
|
||||
acceptChild(visitor, this.orderBy);
|
||||
acceptChild(visitor, this.hints);
|
||||
}
|
||||
|
||||
visitor.endVisit(this);
|
||||
|
||||
Reference in New Issue
Block a user