[#8037] DSL.localDate() and DSL.localTime() don't work correctly on SQLite

This commit is contained in:
lukaseder 2018-11-09 17:07:30 +01:00
parent 31fd89753c
commit 4eb8fe5ea9

View File

@ -39,9 +39,6 @@ package org.jooq.impl;
import static org.jooq.impl.DSL.keyword;
import java.sql.Date;
import java.sql.Time;
import org.jooq.Configuration;
import org.jooq.DataType;
import org.jooq.Field;
@ -67,9 +64,9 @@ final class DateOrTime<T> extends AbstractFunction<T> {
}
private static String name(DataType<?> dataType) {
return dataType.getType() == Date.class
return dataType.isDate()
? "date"
: dataType.getType() == Time.class
: dataType.isTime()
? "time"
: "timestamp";
}
@ -86,9 +83,9 @@ final class DateOrTime<T> extends AbstractFunction<T> {
case SQLITE: {
String name =
getDataType().getType() == Date.class
getDataType().isDate()
? "date"
: getDataType().getType() == Time.class
: getDataType().isTime()
? "time"
: "datetime";