static String escapeChars(final String value) {
        // replace \ with \\
        // replace " with \"
        // replace ' with \'

        return value.replaceAll("\\\\", Matcher.quoteReplacement("\\\\"))
                .replaceAll("\\\"", Matcher.quoteReplacement("\\\""))
                .replaceAll("'", Matcher.quoteReplacement("\\'"));
    }
Escapes unsafe characters for use in strings in SQL statements.
<p>
replace \ with \\
<p>
replace " with \"
<p>
replace ' with \'

@param value The string to clean
@return The cleaned string
stroom-statistics/stroom-statistics-impl-sql/src/main/java/stroom/statistics/impl/sql/SQLSafe.java