Thank you for the tips! Have a good one!

On Monday, January 24, 2022 at 11:43:49 PM UTC+2 [email protected] wrote:

> On Mon, Jan 24, 2022 at 10:34 PM Yanko Bahchevanov <[email protected]> 
> wrote:
>
>> Hey Lukas,
>>
>> Appreciate the answer! By your explanation if I switch to using a pure 
>> JDBC driver implementation, will it work with custom data classes or will I 
>> have to still use the POJOs generated from JOOQ itself?
>>
>
> You'll probably find answers in resources like the below? Let me know if 
> you have more questions
>
> - 
> https://blog.jooq.org/jooq-3-15s-new-multiset-operator-will-change-how-you-think-about-sql/
> - 
> https://www.jooq.org/doc/latest/manual/sql-building/column-expressions/multiset-value-constructor/
> - 
> https://www.jooq.org/doc/latest/manual/sql-execution/fetching/ad-hoc-converter/
>  
>
>> The main reason why I did not want to use those was, because I couldn't 
>> get it to serialize easily to a pure JSON data structure for HTTP output. 
>> My case is very simple request-> query -> response, so being able to just 
>> get the result and serialize it to JSON easily without much boilerplate is 
>> a bit important to me. 
>>
>
> Well, there's no stopping you from going the direct path:
>
> https://www.jooq.org/doc/latest/manual/sql-building/column-expressions/json-functions/
>
> MULTISET etc is for Java consumers. If your consumers prefer JSON, why the 
> intermediate step?
>  
>
>> I can still use the POJOs even without changing the driver if it will fix 
>> the issue, not using them was a conscoius decision on my side, not a 
>> limitation or anything. These third parties that I am using are more of a 
>> bridge for Vert.x reactive SQL client than anything else, so they dont 
>> really change anything and still use the JOOQ methods underneath. 
>>
>
>> This is the line after the query declaration for a bit of context: 
>>
>> val cases = jooq.execute(casesQuery, 
>> DSLAdapter.fetchMany(casesQuery.asTable(), Case::class.java)).await()
>>
>> And this is the "bridge" that I am using, if it can help shed some light 
>> on the problem. 
>>
>> https://github.com/zero88/jooqx 
>>
>
> I'm not too acquainted with the inner workings of that third party 
> library, but a quick search shows that they're extracting SQL from jOOQ:
>
> https://github.com/zero88/jooqx/blob/f3b40fcd7bb415e137952ee7cdd0443efb199972/core/src/main/java/io/zero88/jooqx/SQLImpl.java#L114
>
> Which is probably done to bind to a non-JDBC API. Hence, I seriously doubt 
> they've implemented multiset support. But why not ask the author(s) about 
> their own opinions on what the limitations are?
>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/4a463c1b-0d98-421e-9068-b05112d7f9f0n%40googlegroups.com.

Reply via email to