某些数据库的getParameterMetaData 会返回 NULL,然后导致报错,也需要规避这种情况

This commit is contained in:
yisiliang
2025-05-09 18:59:31 +08:00
parent 8b9392b648
commit 3c49d9524a

View File

@@ -301,6 +301,9 @@ public class StatementUtil {
final ParameterMetaData pmd;
try {
pmd = ps.getParameterMetaData();
if (pmd == null) {
return sqlType;
}
sqlType = pmd.getParameterType(paramIndex);
} catch (SQLException ignore) {
// ignore