Yes, it would be very useful, indeed, and much simpler than transforming the AST via the VisitListener SPI.
We're looking into reworking the "model API" in jOOQ 4.0: https://github.com/jOOQ/jOOQ/issues/2198 The current design won't let us expose all AST elements cleanly to clients, I'm afraid. Cheers, Lukas 2015-07-15 14:24 GMT+02:00 Eduardo Ramos Ibáñez <[email protected]>: > Hi Lukas, > Thanks, I will take a look at that and see if it can help us better than > keeping track of the expressions. > > Though I think some methods to extract information from the Select API > would be a really useful addition. > > Thank you, > Eduardo > > El lunes, 13 de julio de 2015, 19:28:39 (UTC+2), Lukas Eder escribió: >> >> Your use-case sounds perfect for jOOQ's VisitListeners: >> >> http://www.jooq.org/doc/latest/manual/sql-building/queryparts/custom-sql-transformation >> >> I've just recently written a blog post about how to implement row-level >> security with jOOQ: >> >> http://blog.jooq.org/2015/06/17/implementing-client-side-row-level-security-with-jooq >> >> And Aakash, a jOOQ user has just recently written his own blog post about >> a similar use-case: >> http://aakashjapi.com/caching-with-jooq-and-redis >> >> Let me know if this is helpful for now. If you want to go down that path, >> I'll be very happy to provide assistance with any concrete questions that >> you may have. >> >> Cheers >> Lukas >> >> 2015-07-01 20:24 GMT+02:00 Eduardo Ramos Ibáñez <[email protected]>: >> >>> Hi, >>> >>> I was wondering wether it's possible to extract fields from a select, >>> but without being limited to their alias? >>> If I use select.fields() I get the alias of the fields, but I cannot >>> access the underlying expression of each one. >>> >>> This would be useful for extracting selected expressions from an unknown >>> select and adding filters based on them (without doing a subselect, for >>> which alias fields are fine). >>> >>> As a workaround, I guess I can always keep a separate collection of >>> fields and provide it with the select, but I would like to avoid doing that >>> if possible. >>> >>> Thank you >>> >>> -- >>> 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. > -- 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.
