On 2019-10-22 10:50, Lukas Eder wrote:
As a related remark, being able to specify the part parameter would
be a
great feature as well. The results of DATEDIFF(DAY, ..., ...) and
DATEDIFF(MILLISECOND, ..., ...) are not entirely equivalent as
DATEDIFF
only uses the specified part and 'higher' parts for calculating the
difference. For example, DATEDIFF(DAY, timestamp '2019-10-21
23:59:59.999', timestamp '2019-10-22 00:00:00') is 1, but
DATEDIFF(MILLISECOND, timestamp '2019-10-21 23:59:59.999', timestamp
'2019-10-22 00:00:00') is also 1. In my specific use case, this
doesn't
really matter, but it might be a relevant difference for example
when
using a greaterThan comparison.
Absolutely!
https://github.com/jOOQ/jOOQ/issues/7900
There are a variety of such feature requests on our roadmap. While
each one of them is very useful on its own, they're all very difficult
to implement, as all dialects are completely different when it comes
to date time arithmetic. This is why some of these features are still
not available in jOOQ.
I entirely understand that, and with the available workarounds this is
not a pressing matter.
Have you considered exposing or using the JDBC escapes like
TIMESTAMPDIFF and then leave it up to the driver to provide the
translation? That does assume that drivers implement those JDBC escapes,
but it is required for the Java EE support level of a driver.
Mark
--
You received this message because you are subscribed to the Google Groups "jOOQ User
Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jooq-user/47f79db97d3274f7d971d201235c8d83%40lawinegevaar.nl.