use of org.cubrid.sqlformatter.SqlFormatManager in project cubrid-manager by CUBRID.
the class SqlFormattingStrategy method format.
/**
* Format the SQL content
*
* @param content String
* @return String
*/
public String format(String content) {
if (StringUtil.isEmpty(content)) {
return "";
}
ServerInfo serverInfo = databaseProvider == null ? null : databaseProvider.getServerInfo();
boolean isLowerCase = QueryOptions.getKeywordLowercase(serverInfo);
SqlFormatOptions options = new SqlFormatOptions();
options.setUpperCaseKeyword(!isLowerCase);
SqlFormatManager formattingManager = new SqlFormatManager();
return formattingManager.format(content, options);
}
Aggregations