mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser.
This commit is contained in:
@@ -4485,4 +4485,18 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Paramet
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean visit(SQLFlashbackExpr x) {
|
||||
print0(x.getType().name());
|
||||
print(' ');
|
||||
SQLExpr expr = x.getExpr();
|
||||
if (expr instanceof SQLBinaryOpExpr) {
|
||||
print('(');
|
||||
expr.accept(this);
|
||||
print(')');
|
||||
} else {
|
||||
expr.accept(this);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -726,4 +726,10 @@ public interface SQLASTVisitor {
|
||||
boolean visit(SQLCommitStatement x);
|
||||
|
||||
void endVisit(SQLCommitStatement x);
|
||||
|
||||
|
||||
boolean visit(SQLFlashbackExpr x);
|
||||
|
||||
void endVisit(SQLFlashbackExpr x);
|
||||
//
|
||||
}
|
||||
|
||||
@@ -1643,7 +1643,6 @@ public class SQLASTVisitorAdapter implements SQLASTVisitor {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLCommitStatement x) {
|
||||
return true;
|
||||
@@ -1653,4 +1652,14 @@ public class SQLASTVisitorAdapter implements SQLASTVisitor {
|
||||
public void endVisit(SQLCommitStatement x) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLFlashbackExpr x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLFlashbackExpr x) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user