提交 4badadb8 编写于 作者: S serge-rider

#812 SQL formatter fix: handle colons properly

上级 7e19c9e7
......@@ -320,6 +320,12 @@ public class SQLTokenizedFormatter implements SQLFormatter {
// Do not add space between name and value [JDBC:MSSQL]
continue;
}
if (token.getType() == TokenType.SYMBOL && ":".equals(token.getString()) ||
prev.getType() == TokenType.SYMBOL && ":".equals(prev.getString()))
{
// Do not insert spaces around colons
continue;
}
if (token.getType() == TokenType.SYMBOL && prev.getType() == TokenType.SYMBOL) {
// Do not add space between symbols
continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册