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:
@@ -64,10 +64,15 @@ public class ParameterizedOutputVisitorUtils {
|
||||
out.append(";\n");
|
||||
}
|
||||
SQLStatement stmt = statementList.get(i);
|
||||
|
||||
if (stmt.hasBeforeComment()) {
|
||||
stmt.getBeforeCommentsDirect().clear();
|
||||
}
|
||||
stmt.accept(visitor);
|
||||
}
|
||||
|
||||
if (visitor.getReplaceCount() == 0 && !parser.getLexer().hasComment()) {
|
||||
if (visitor.getReplaceCount() == 0
|
||||
&& parser.getLexer().getCommentCount() == 0) {
|
||||
return sql;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user