Closed doukai closed 2 years ago
@doukai
Try this.
Map<String, Object> params = new HashMap<>();
params.put("param1", 1);
String formatted =
SqlFormatter.extend(cfg -> cfg.plusNamedPlaceholderTypes(":"))
.format("SELECT * FROM table1 WHERE foo = :param1", params);
System.out.println(formatted);
cool! very useful~
hi, in jdbc,the named parameter is :param but i find parameter in lib is @param any idea about replcase @ to : ? thanks~