mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser.
This commit is contained in:
@@ -35,6 +35,8 @@ public class SQLBinaryOpExpr extends SQLExprImpl implements SQLReplaceable, Seri
|
||||
private SQLBinaryOperator operator;
|
||||
private String dbType;
|
||||
|
||||
private boolean bracket = false;
|
||||
|
||||
public SQLBinaryOpExpr(){
|
||||
|
||||
}
|
||||
@@ -99,6 +101,14 @@ public class SQLBinaryOpExpr extends SQLExprImpl implements SQLReplaceable, Seri
|
||||
this.operator = operator;
|
||||
}
|
||||
|
||||
public boolean isBracket() {
|
||||
return bracket;
|
||||
}
|
||||
|
||||
public void setBracket(boolean bracket) {
|
||||
this.bracket = bracket;
|
||||
}
|
||||
|
||||
protected void accept0(SQLASTVisitor visitor) {
|
||||
if (visitor.visit(this)) {
|
||||
acceptChild(visitor, this.left);
|
||||
|
||||
@@ -87,4 +87,14 @@ public class SQLQueryExpr extends SQLExprImpl implements Serializable {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public SQLQueryExpr clone() {
|
||||
SQLQueryExpr x = new SQLQueryExpr();
|
||||
|
||||
if (subQuery != null) {
|
||||
x.setSubQuery(subQuery.clone());
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user