This commit is contained in:
温少
2012-03-15 14:25:42 +08:00
parent 4bf0785f57
commit fc910ce774
11 changed files with 38 additions and 20 deletions
@@ -967,7 +967,7 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter {
@Override
public boolean visit(SQLTruncateStatement x) {
print("TRUNCATE TABLE ");
printAndAccept(x.getTableNames(), ", ");
printAndAccept(x.getTableSources(), ", ");
return false;
}
@@ -377,7 +377,9 @@ public class SchemaStatVisitor extends SQLASTVisitorAdapter {
String originalTable = getCurrentTable();
for (SQLName name : x.getTableNames()) {
for (SQLExprTableSource tableSource : x.getTableSources()) {
SQLName name = (SQLName) tableSource.getExpr();
String ident = name.toString();
setCurrentTable(ident);
x.putAttribute("_old_local_", originalTable);