mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser. for issue #1919
This commit is contained in:
@@ -78,6 +78,12 @@ public class MySqlExprParser extends SQLExprParser {
|
||||
this.lexer.nextToken();
|
||||
}
|
||||
|
||||
|
||||
public MySqlExprParser(String sql, boolean skipComment,boolean keepComments){
|
||||
this(new MySqlLexer(sql, skipComment, keepComments));
|
||||
this.lexer.nextToken();
|
||||
}
|
||||
|
||||
public SQLExpr relationalRest(SQLExpr expr) {
|
||||
if (identifierEquals("REGEXP")) {
|
||||
lexer.nextToken();
|
||||
|
||||
@@ -98,6 +98,10 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
super(new MySqlExprParser(sql, keepComments));
|
||||
}
|
||||
|
||||
public MySqlStatementParser(String sql, boolean skipComment, boolean keepComments) {
|
||||
super(new MySqlExprParser(sql, skipComment, keepComments));
|
||||
}
|
||||
|
||||
public MySqlStatementParser(Lexer lexer) {
|
||||
super(new MySqlExprParser(lexer));
|
||||
}
|
||||
|
||||
+10
@@ -1003,4 +1003,14 @@ public class OracleToMySqlOutputVisitor extends MySqlOutputVisitor implements Or
|
||||
public void endVisit(OracleTreatExpr x) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(OracleCreateSynonymStatement x) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endVisit(OracleCreateSynonymStatement x) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user