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