Java 类org.hibernate.engine.jdbc.internal.BasicFormatterImpl 实例源码

项目:JITRAX    文件:Workspace.java   
private void formatCodeIfNeeded() {
    String nonFormattedSqlCode;
    if (getSelectedQuery() != null) {
        nonFormattedSqlCode = getSelectedQuery().getSqlTranslation();
        if (formattedSqlCodeCheck.isSelected()) {
            if (nonFormattedSqlCode.length() > 0) {
                // Format SQL Code
                sqlCodeEditor.setText(new BasicFormatterImpl().format(nonFormattedSqlCode));
            }
        }

        else {
            sqlCodeEditor.setText(nonFormattedSqlCode);
        }
    }
}
项目:OperatieBRP    文件:SqlStamementZoekPersoon.java   
@Override
public String toString() {
    final String format = sql.replaceAll("\\?", "%s");
    final Object[] parametersConverted = parameters.stream().map(p -> p instanceof String ? "'" + p + "'" : p).collect(Collectors.toList()).toArray();
    return new BasicFormatterImpl().format(String.format(format, parametersConverted));
}
项目:JITRAX    文件:Workspace.java   
public BasicFormatterImpl getSqlFormatter() {
    return sqlFormatter;
}
项目:JITRAX    文件:Workspace.java   
public void setSqlFormatter(BasicFormatterImpl sqlFormatter) {
    this.sqlFormatter = sqlFormatter;
}
项目:sql-formatter    文件:SqlFormatter.java   
public void format() throws IOException {
    String original = readSql();
    String formatted = new BasicFormatterImpl().format(original);
    writer.write(formatted);
    writer.flush();
}
项目:kensho    文件:QueryView.java   
public String getPrettySQL() {
    String formattedSQL = new BasicFormatterImpl().format(query.query);
    return formattedSQL;
}