Hello,

We do have a means of introspecting and transforming queries being
rendered. This is documented (quite scarcely right now) in the manual:

-
http://www.jooq.org/doc/latest/manual/sql-building/queryparts/custom-sql-transformation
-
http://www.jooq.org/doc/latest/manual/sql-building/queryparts/custom-sql-transformation/transformation-bind-value-abbreviation/

The main driving use-case for implementing this was to allow for
tailor-made row-level security and multi-tenancy features to be
implemented. I.e. to do precisely what you're planning on doing.

We'll be adding more examples in the near future. For now, I suggest you
try using this VisitorListener SPI and if you have concrete questions about
it, I'll be more than happy to help.

Note that in jOOQ 4.0, we're planning to implement a much more potent
"model API" that will allow for accessing the complete AST directly, not
only via VisitorListeners. But jOOQ 4.0 is not being worked on yet.

Cheers,
Lukas



2014-09-24 10:27 GMT+02:00 <[email protected]>:

> Hello,
>
> I am evatuating your library for maybe use it in our new project.
> I have implemented my own listener and I want to check somes conditions
> into the query (where clause). Or maybe add a condition to the query.
>
> Is there a way to access to the private attribute conditions into the
> query object ? It seems to be very interesting for doing this.
>
> The only solution I have found is to use
> ctx.query().getSQL(ParamType.INLINED) but it is more complicated to work
> with a String.
>
> Thanks for your help.
>
> --
> 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.
>

-- 
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