Hello Ian,
I'm about to standardise date/time arithmetic for jOOQ 2.2.0. This
area is quite complex, as hardly any database follows the SQL standard
for date/time intervals. In the mean time, I suggest you use
MySQL-specific date/time functions, as specified here:
http://dev.mysql.com/doc/refman/5.6/en/date-and-time-functions.html#function_date-add
i.e.
create
.update(RSS_DESTINATION_SOURCES)
.set(NEXT_POLL_AFTER,
// Create a plain SQL function for adding dates
function("date_add", Timestamp.class, NEXT_POLL_AFTER,
// Add a MySQL-specific interval literal to your date
literal("interval 1 hour")));
Cheers
Lukas
2012/3/31 Ian Clarke <[email protected]>:
> A quick question:
>
> How would I update a field (a MySql timestamp) to the current time plus 1
> hour?
>
> ie.
>
> create.update(Tables.RSS_DESTINATION_SOURCES)
> .set(RssDestinationSources.NEXT_POLL_AFTER, ??? )
>
> Thanks,
>
> Ian.
>
> --
> Ian Clarke
> Blog: http://blog.locut.us/
>