String c = ""; if (attribute.className().equals("String") || attribute.className().equals("java.lang.String")) { c = "'";
if (!shouldUseBindVariableForAttribute(attribute)) { String c = ""; if (attribute.className().endsWith("String") || attribute.externalType().indexOf("char") > -1 ) { c = "'"; } return c + super.sqlStringForValue(v,kp) + c + "::" + s; } else { return super.sqlStringForValue(v, kp) + "::" + s;
    public String sqlStringForValue(Object v, String kp) {        if(disableTypeCasting()) {            return super.sqlStringForValue(v,kp);        }        EOAttribute attribute;        int lastDotIdx = kp.lastIndexOf(".");        if (lastDotIdx == -1) {            attribute = entity().attributeNamed(kp);        } else {            EOEntity kpEntity = entityForKeyPath(kp);            attribute = kpEntity.attributeNamed(kp.substring(lastDotIdx+1));        }        if(attribute != null && v != null && v != NSKeyValueCoding.NullValue) {            String s = columnTypeStringForAttribute(attribute);            String c = "";            if (attribute.className().equals("String") || attribute.className().equals("java.lang.String")) {                c = "'";            }            return new StringBuffer(c).append(super.sqlStringForValue(v,kp)).append(c).append("::").append(s).toString();        }                 return super.sqlStringForValue(v,kp);    }