Merge pull request #3936 from yisiliang/v5-master

某些数据库的getParameterMetaData 会返回 NULL,然后导致报错,也需要规避这种情况
This commit is contained in:
Golden Looly 2025-05-12 09:15:22 +08:00 committed by GitHub
commit ed180873a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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