Hi Knut,
I have a requirement where i wanted to return the result with sorted order
of the IDs i am passing in to the query to fetch the data from DB.
I wrote this POSTGRES query and able to get the result with same order as
the IDs i am passing.
So how can i convert this query into JOOQ format ? Can you please help me ?
Thanks,
Deba
with
cta1 as (
select array[
'125d7988-14d7-4898-bf89-0b54eb8aa317',
'63028718-bf33-4e3f-a6bd-ef7c0e941205',
'a1266416-4e7d-4426-9b9d-e5c66d15ffbc',
'940b3c50-7a5e-49d5-8105-b3ddfdfde9c1',
'86a1647f-a24d-45c0-ae04-0e19c2fd10e2'] as a),
cta2 as (
select
unnest(a)::uuid id,
generate_series(1, array_length(a, 1)) idx
from cta1)
select
idx,
d.id,
d.title
from cta2
join public.deck d on d.id = cta2.id order by idx;
--
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/e564fa8b-cbb6-4ced-93be-caf9152a64cc%40googlegroups.com.