SQLAlterTableRename add method.

This commit is contained in:
wenshao
2017-12-01 18:32:22 +08:00
parent b3fa3b946c
commit ba07df232b
@@ -18,6 +18,7 @@ package com.alibaba.druid.sql.ast.statement;
import com.alibaba.druid.sql.ast.SQLExpr;
import com.alibaba.druid.sql.ast.SQLName;
import com.alibaba.druid.sql.ast.SQLObjectImpl;
import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
public class SQLAlterTableRename extends SQLObjectImpl implements SQLAlterTableItem {
@@ -32,6 +33,10 @@ public class SQLAlterTableRename extends SQLObjectImpl implements SQLAlterTableI
this.setTo(to);
}
public SQLAlterTableRename(String to) {
this.setTo(to);
}
public SQLExprTableSource getTo() {
return to;
}
@@ -57,6 +62,10 @@ public class SQLAlterTableRename extends SQLObjectImpl implements SQLAlterTableI
this.to = to;
}
public void setTo(String to) {
this.setTo(new SQLIdentifierExpr(to));
}
public void setTo(SQLExpr to) {
this.setTo(new SQLExprTableSource(to));
}