Okay, I am trying to write an expression like this in jOOQ.
WHERE extract(hour from now() at time zone 'UTC' + d.utc_offset)
The field d.utc_offset is an Day to Second Interval.
I understand that JOOQ does not allow me to write the "extract(hour from now() at time zone 'UTC' + d.utc_offset)" but I was hoping I could do something like the following:
Field<Date> now = DSL.createFrield("now() at time zone 'UTC'");
DSL.extract(now.plus(d.utc_offset), DatePart.HOUR).between(10, 22);
But the JOOQ documentation is vast and I couldn't figure out how to do that. I'd even be happy to do something like:
where(Field.create("extract(hour from now() at time zone 'UTC' + d.utc_offset)", Integer.class).between(10,22))
But I couldn't figure out how to do that either. Is anyone able to point me in the right direction?
Thanks!