sql-formatter
sql-formatter copied to clipboard
IndexedParams ,This class needs to be replaced with the following code, otherwise a null pointer error will be reported when adding in bulk
IndexedParams(List<?> params) { List tempParam = new ArrayList<>(params.size()); for (Object param : params) { if (param == null){ param = "null"; }else if (param instanceof Number){ }else if (param instanceof String){ param = "'"+param+"'"; }else if (param instanceof Date){ param = "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(param) + "'"; }else{ } tempParam.add(param); } this.params = new ArrayDeque<>(tempParam); }