@Override
    protected String escapeForLike(String str) {
        final StringBuilder rv = new StringBuilder(str.length() + 3);
        for (char ch : str.toCharArray()) {
            if (ch == getEscapeChar() || ch == '%' || ch == '_' || ch == '[') {
                rv.append(getEscapeChar());
            }
            rv.append(ch);
        }
        return rv.toString();
    }
{@code SQLServerTemplates} is an SQL dialect for Microsoft SQL Server

@author tiwe
querydsl-sql/src/main/java/com/querydsl/sql/SQLServerTemplates.java