mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-11-29 18:58:05 +08:00
[DS-16046][fix] Set PreparedStatement parameter type (#16050)
Fix the PreparedStatement parameter is TIME, set it to java.sql.Time Co-authored-by: Aaron Wang <wangweirao16@gmail.com> Co-authored-by: Rick Cheng <rickchengx@gmail.com>
This commit is contained in:
parent
581a7edad8
commit
baa252a0ed
@ -145,7 +145,7 @@ public class ParameterUtils {
|
||||
} else if (dataType.equals(DataType.DATE)) {
|
||||
stmt.setDate(index, java.sql.Date.valueOf(value));
|
||||
} else if (dataType.equals(DataType.TIME)) {
|
||||
stmt.setString(index, value);
|
||||
stmt.setTime(index, java.sql.Time.valueOf(value));
|
||||
} else if (dataType.equals(DataType.TIMESTAMP)) {
|
||||
stmt.setTimestamp(index, java.sql.Timestamp.valueOf(value));
|
||||
} else if (dataType.equals(DataType.BOOLEAN)) {
|
||||
|
Loading…
Reference in New Issue
Block a user