@Override
    public void apply(StringBuilder builder, Object param, Object... more) {
        if (!hasParameter()) {
            builder.append(originalQuery);
            return;
        }

        int len = more == null ? 0 : more.length + 1;
        int index = 0;
        for (QueryPart p : getParts()) {
            builder.append(p.part);
            if (index > 0) {
                param = index < len ? more[index - 1] : null; // NOSONAR
            }
            builder.append(toSqlExpression(p.paramName, param));
            index++;
        }

        appendLastPartIfExists(builder);
    }
Creates an instance by parsing the given query.

@param config non-null configuration
@param query  non-empty SQL query
@return parameterized query
clickhouse-jdbc/src/main/java/com/clickhouse/jdbc/JdbcParameterizedQuery.java