mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
SQLAlterTableRename add method.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user