Re: rewrite an insert query at runtime to populate a field with dynamic value

2024-06-05 Thread Alf Lervåg
Just curious, is it possible to check if the field is available from the RecordContext by using ctx.recordType().field("modified_by")?Alf Lervåg1. juni 2024 kl. 20:55 skrev Dominik Hirt :If you're using jooq records, you could use a RecordListener like I do for a similar case. My from field is mod

Modifying context settings for single query

2024-06-05 Thread ry...@monoicon.com
Hi I'm working on an export query that returns tens of millions of rows and in order to keep the memory usage under control I'm using the fetchStream() method to stream them into a zip file. I found that I also need to set the fetchSize on the settings object to prevent my application (Java EE

Re: Modifying context settings for single query

2024-06-05 Thread Lukas Eder
Hi Ryan, You shouldn't modify the Settings object of your single application scoped DSLContext, because that's not a thread safe operation. Instead, access DSLContext.configuration() and call Configuration.derive() (or deriveSettings() for convenience) in order to create a locally scoped Configura

Re: Modifying context settings for single query

2024-06-05 Thread Lukas Eder
Of course, you can scope your fetchSize alteration to an individual ResultQuery by calling ResultQuery.fetchSize(), as well. On Wed, Jun 5, 2024 at 12:23 PM Lukas Eder wrote: > Hi Ryan, > > You shouldn't modify the Settings object of your single application scoped > DSLContext, because that's no

Re: Modifying context settings for single query

2024-06-05 Thread ry...@monoicon.com
Thanks for the very fast response, setting it on the ResultQuery gave the right result. I can see where I missed that in the documentation now too. On Wednesday 5 June 2024 at 12:24:03 UTC+2 lukas...@gmail.com wrote: > Of course, you can scope your fetchSize alteration to an individual > Result