Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
lukaseder opened this issue Nov 9, 2018 · 0 comments
Closed

Comments

@lukaseder
Copy link
Member

lukaseder commented Nov 9, 2018

Internally, the DSL.localDate() and DSL.localTime() methods check if the supplied data type is java.sql.Date or java.sql.Time, falling through to java.sql.Timestamp, otherwise. This is incorrect. We should check for java.time.LocalDate and java.time.LocalTime as well:

org.jooq.impl.DateOrTime:

                String name =
                      getDataType().getType() == Date.class
                    ? "date"
                    : getDataType().getType() == Time.class
                    ? "time"
                    : "datetime";

The problem also has effects on other SQL dialects, namely that the expression is erroneously named timestamp. That effect is more of a cosmetic nature.


See also:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant