Hey Lukas,

On Tue, Feb 18, 2014 at 6:07 PM, Lukas Eder <[email protected]> wrote:
> 1. A VisitListener that replaces a top-level Field QueryPart in the
> Clause.SELECT clause when some condition is matched. An example can be seen
> here:
> http://www.jooq.org/doc/latest/manual/sql-building/queryparts/custom-sql-transformation/transformation-bind-value-abbreviation/

This style of visitor API does lend itself well to being able to defer
the logic of SQL rewriting to the app but still have access to JOOQ's
type safety and column metadata. So had I been a bit more mature, I
would have considered this approach. That said, I at the start of the
day, I didn't know about this API. Would it let you patch out only the
columns of the outer most select?

> 2. An ExecuteListener that patches generated SQL using a regex. This might
> be more difficult (not possible) to get right, generally.

This sounds like a feat of Jedi framework building.

> 3. Your solution works fine, too, of course.

If I had to specify the API based on this problem alone, it would be a
callback filter on the SelectJoinStep. But maybe that just boils down
to option (1) in the end.

-- 
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/groups/opt_out.

Reply via email to