mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
sql parser support drds ddl, for issue #2433
This commit is contained in:
@@ -21,6 +21,7 @@ public class SQLPartitionByHash extends SQLPartitionBy {
|
||||
|
||||
// for aliyun ads
|
||||
protected boolean key;
|
||||
protected boolean unique;
|
||||
|
||||
public boolean isKey() {
|
||||
return key;
|
||||
@@ -30,6 +31,14 @@ public class SQLPartitionByHash extends SQLPartitionBy {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public boolean isUnique() {
|
||||
return unique;
|
||||
}
|
||||
|
||||
public void setUnique(boolean unique) {
|
||||
this.unique = unique;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void accept0(SQLASTVisitor visitor) {
|
||||
if (visitor.visit(this)) {
|
||||
@@ -43,7 +52,10 @@ public class SQLPartitionByHash extends SQLPartitionBy {
|
||||
public SQLPartitionByHash clone() {
|
||||
SQLPartitionByHash x = new SQLPartitionByHash();
|
||||
|
||||
cloneTo(x);
|
||||
|
||||
x.key = key;
|
||||
x.unique = unique;
|
||||
|
||||
for (SQLExpr column : columns) {
|
||||
SQLExpr c2 = column.clone();
|
||||
@@ -53,4 +65,8 @@ public class SQLPartitionByHash extends SQLPartitionBy {
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
public void cloneTo(SQLPartitionByHash x) {
|
||||
super.cloneTo(x);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1106,4 +1106,5 @@ public class SQLCreateTableStatement extends SQLStatementImpl implements SQLDDLS
|
||||
}
|
||||
this.rowFormat = x;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user