sql parser refactor

This commit is contained in:
温少
2012-05-16 15:15:25 +08:00
14 changed files with 92 additions and 68 deletions
@@ -3,6 +3,7 @@ package com.alibaba.druid.sql.ast.statement;
import java.util.ArrayList;
import java.util.List;
import com.alibaba.druid.sql.ast.SQLName;
import com.alibaba.druid.sql.ast.SQLStatementImpl;
public class SQLAlterTableStatement extends SQLStatementImpl implements SQLDDLStatement {
@@ -28,4 +29,14 @@ public class SQLAlterTableStatement extends SQLStatementImpl implements SQLDDLSt
this.tableSource = tableSource;
}
public SQLName getName() {
if (getTableSource() == null) {
return null;
}
return (SQLName) getTableSource().getExpr();
}
public void setName(SQLName name) {
this.setTableSource(new SQLExprTableSource(name));
}
}