improved sql parser.

This commit is contained in:
wenshao
2016-10-20 15:59:10 +08:00
parent f66c08fb51
commit cc58cf8be9
9 changed files with 126 additions and 8 deletions
@@ -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;
}