refactor sql parser.

This commit is contained in:
wenshao
2017-08-29 17:10:26 +08:00
parent 2b164c377b
commit 718500cf59
24 changed files with 235 additions and 282 deletions
@@ -123,7 +123,7 @@ public class Demo1 extends TestCase {
String tableName = identExpr.getName();
if (tableName.equals("user")) {
identExpr.setName(this.tableName);
x.setExpr(this.tableName);
}
} else if (expr instanceof SQLPropertyExpr) {
SQLPropertyExpr proExpr = (SQLPropertyExpr) expr;
@@ -144,7 +144,7 @@ public class Demo1 extends TestCase {
String tableName = identExpr.getName();
if (tableName.equals("user")) {
identExpr.setName(this.tableName);
x.setExpr(this.tableName);
}
} else if (expr instanceof SQLPropertyExpr) {
SQLPropertyExpr proExpr = (SQLPropertyExpr) expr;
@@ -74,7 +74,7 @@ public class Demo2 extends TestCase {
String ident = identExpr.getName();
if (ident.equals("user")) {
identExpr.setName(tableName);
tableSource.setExpr(tableName);
}
} else if (expr instanceof SQLPropertyExpr) {
SQLPropertyExpr proExpr = (SQLPropertyExpr) expr;
@@ -113,7 +113,7 @@ public class Demo3 extends TestCase {
String ident = identExpr.getName();
if (ident.equals("user")) {
identExpr.setName(tableName);
tableSource.setExpr(new SQLIdentifierExpr(tableName));
}
} else if (expr instanceof SQLPropertyExpr) {
SQLPropertyExpr proExpr = (SQLPropertyExpr) expr;