Hi Lukas, I need to be able to run the statements ad-hoc. What I mean by that is I need them for some queries and not others, it's not something I want to universally apply across all connections or transactions. Ideally I'd do it from the DSLContext...
On Wednesday, December 2, 2015 at 5:13:54 AM UTC-5, Lukas Eder wrote: > > There are many ways to accomplish this with jOOQ. The most straightforward > way is to implement this inside of a ConnectionProvider (call SET on > acquire() and RESET on release()). Another solution would be to hook into > the transaction lifecycle and run the statements at the beginning and at > the end of a transaction. > > When do you want to run the statements? > > 2015-12-01 20:31 GMT+01:00 Max Kremer <[email protected] <javascript:>> > : > >> >> >> In PostGres (as well other DBs I've used) you can set runtime params that >> affect the query and/or result. This is accomplished with the use of SET >> and RESET as described here >> <http://www.postgresql.org/docs/9.4/static/sql-set.html> >> >> >> >> SET search_path TO my_schema, public >> SELECT * from foo >> RESET search_path >> >> >> I can't seem to find a way to accomplish this with JOOQ. >> >> Thanks in advance for any pointers. >> >> -- >> 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] <javascript:>. >> 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.
