use of org.jkiss.dbeaver.model.sql.format.tokenized.SQLTokenizedFormatter in project dbeaver by serge-rider.
the class SQLUtils method formatSQL.
public static String formatSQL(SQLDataSource dataSource, String query) {
SQLSyntaxManager syntaxManager = new SQLSyntaxManager();
syntaxManager.init(dataSource.getSQLDialect(), dataSource.getContainer().getPreferenceStore());
SQLFormatterConfiguration configuration = new SQLFormatterConfiguration(syntaxManager);
return new SQLTokenizedFormatter().format(query, configuration);
}
Aggregations