Hello,

lets start with what i want to achieve:
I want to use the "generate_series" feature of postgresql with 
timestamps/dates.

I know there is DSL.generateSeries(Date, DatePart). But this version has a 
huge drawback: DatePart doesn't know WEEK. What a pity!

So i need to implement my own version which supports the WEEK as a date 
part like so:

DSL.table("generate_series({0}, {1}, {2}", timestamp1, timestamp2, 
datePart);

this kind of work. But now i want to JOIN on the result. But unfortunately 
the resulting `Table` thingy is a crippled version of an actual table and 
doesn't declare any fields i could reference in my query.

I then started to investigate how jooq itself implements 
DSL.generateSeries(..) and found it basucally instantiates a new Object of 
a class `GenerateSeries` which extends AbstractTable<Record1<Integer>>

Too bad i cannot extend from the very same Class. but `Custom*` to the 
rescue! Which one could i extend from? CustomField? nope. I want something 
i can use as a table.

CustomTable maybe? Nope this on is intended to represent an actual table i 
e.g. could insert into - i cant insert into a series.
But finally CustomQueryPart will do the job! Nope. The CustomQueryPart is 
not allowed to declare any fields.

OK `Custom*` are no friends of mine.

What to do now?  Sure, i could implement the interface org.jooq.Table 
comletly. But, honestly, who wants to implemnt a quadrillion of dummy 
methods, just because DatePart is missing WEEK for YEARS now?!



Any hints on this one? :-)


-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to