Skip to content

Commit 8329421

Browse files
authored
Merge pull request Tencent#394 from MentosL/bugfix
BugFix : Added support for LocalDateTime types
2 parents 19706c6 + beac823 commit 8329421

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

APIJSONORM/src/main/java/apijson/orm/AbstractSQLExecutor.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.sql.Statement;
2020
import java.sql.Time;
2121
import java.sql.Timestamp;
22+
import java.time.LocalDateTime;
2223
import java.util.ArrayList;
2324
import java.util.Arrays;
2425
import java.util.Collection;
@@ -879,6 +880,9 @@ else if (value instanceof Date) {
879880
else if (value instanceof Time) {
880881
value = ((Time) value).toString();
881882
}
883+
else if (value instanceof LocalDateTime) {
884+
value = ((LocalDateTime) value).toString();
885+
}
882886
else if (value instanceof String && isJSONType(config, rsmd, columnIndex, lable)) { //json String
883887
castToJson = true;
884888
}

0 commit comments

Comments
 (0)