improved mysql/oracle sql parser.

This commit is contained in:
wenshao
2017-05-20 22:03:21 +08:00
parent ae0ae2e9e0
commit ac4b6059f0
53 changed files with 1449 additions and 296 deletions
@@ -100,4 +100,8 @@ public class SQLIdentifierExpr extends SQLExprImpl implements SQLName {
public String toString() {
return this.name;
}
public SQLIdentifierExpr clone() {
return new SQLIdentifierExpr(this.name);
}
}
@@ -18,6 +18,7 @@ package com.alibaba.druid.sql.ast.expr;
import com.alibaba.druid.sql.ast.SQLExpr;
import com.alibaba.druid.sql.ast.SQLExprImpl;
import com.alibaba.druid.sql.ast.SQLName;
import com.alibaba.druid.sql.parser.ParserException;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
public class SQLPropertyExpr extends SQLExprImpl implements SQLName {
@@ -109,4 +110,13 @@ public class SQLPropertyExpr extends SQLExprImpl implements SQLName {
return true;
}
public SQLPropertyExpr clone() {
SQLPropertyExpr propertyExpr = new SQLPropertyExpr();
propertyExpr.name = this.name;
if (owner != null) {
propertyExpr.setOwner(owner.clone());
}
return propertyExpr;
}
}