mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
Update StatementUtil.java
add nullTypeMap prevent repeat get metadata in loop
This commit is contained in:
parent
d23bdd9280
commit
49a85af8d0
@ -163,8 +163,9 @@ public class StatementUtil {
|
||||
sql = sql.trim();
|
||||
SqlLog.INSTANCE.log(sql, paramsBatch);
|
||||
PreparedStatement ps = conn.prepareStatement(sql);
|
||||
Map<Integer, Integer> nullTypeMap = new HashMap<>();
|
||||
for (Object[] params : paramsBatch) {
|
||||
StatementUtil.fillParams(ps, params);
|
||||
StatementUtil.fillParams(ps, params, nullTypeMap);
|
||||
ps.addBatch();
|
||||
}
|
||||
return ps;
|
||||
|
Loading…
x
Reference in New Issue
Block a user