if( ret.endsWith("\\")) { ret += "\\"; }
  protected static String sqlQuote(String s) {    if (s == null) return "null";    String ret = null;    int quoteIndex = s.indexOf('\'');    // If the string already starts & ends with a single quote, we're done    if (quoteIndex == 0 && s.lastIndexOf('\'') == s.length() - 1)      return s;    ret = new String(s);    while (quoteIndex >= 0) {      ret = ret.substring(0, quoteIndex) + "''" + ret.substring(quoteIndex + 1);      quoteIndex = ret.indexOf('\'', quoteIndex + 2);    }    return "'" + ret + "'";  }